SAN FRANCISCO -- Two typically reliable kickers missed. Penalties doomed both sides. And a furious, thrilling finish to regulation ended with a dramatic dud in overtime: a tie.

And nobody particularly likes a tie. Especially not the NFC West-leading 49ers, with a chance to separate themselves against a division rival. Or the Rams, eager to snap a three-game losing streak.

San Francisco and St. Louis played the NFL's first tie game in four years as both teams missed overtime field goals in Sunday's 24-24 outcome.

"I have to say, I've been doing this a while. I don't think I've ever been in a game like this," Rams coach Jeff Fisher said. "As I told our guys, we had a number of chances to put the game away. And, unfortunately, we didn't."

Greg Zuerlein kicked a 53-yarder, but the Rams were penalized 5 yards for delay of game -- which holder Johnny Hekker said was his fault. Zuerlein tried again from 58 as Fisher played for the win, and missed wide right with 2:42 left in OT.

San Francisco's David Akers missed wide left on a 41-yard attempt that could have sealed it for the 49ers (6-2-1), who lost quarterback Alex Smith to a first-half concussion.

And just when it seemed the 49ers -- and Akers' typically reliable left leg -- would have one more chance to win it, San Francisco linebacker Patrick Willis was flagged for holding Lance Kendricks on third down. That extended St. Louis' last drive, a costly mistake in a long list of them on an uncharacteristically sloppy day by coach Jim Harbaugh's team.

"I don't know what to make of this," Willis said. "We have one of the best kickers in the game, and it came down to him at the end and he misses it. That tells you right there something wasn't right."

Akers booted a tying 33-yarder with 3 seconds left in regulation after Sam Bradford threw a 2-yard touchdown pass to Austin Pettis with 1:09 remaining.

On the first play of OT, Bradford completed an 80-yard pass to Danny Amendola that took St. Louis (3-5-1) to the 2, but the play was called back for an illegal formation. Some 49ers fans got up to leave, then returned to their seats.

The last tie was between Philadelphia and Cincinnati, 13-13 in 2008. San Francisco played its first tie since 1986.

Frank Gore ran for a 20-yard touchdown with 8:23 to go in regulation just 17 seconds after backup quarterback Colin Kaepernick scurried 7 yards for a score. Kaepernick finished 11 for 17 for 117 yards and also had eight carries for 66 yards, calmly leading the Niners after it took several series to find his groove.

Gore ran for 97 yards, while Michael Crabtree made five catches for 70 yards and a 14-yard touchdown from Smith before he left the game.

Amendola returned for the Rams following a three-game absence with a shoulder injury to make 11 catches for 102 yards. Bradford went 26 for 39 for 275 yards and two touchdowns.

Smith took a hard hit on the back of the neck from linebacker Jo-Lonn Dunbar after a scramble with 1:10 left in the first quarter. But the No. 1 overall pick in the 2005 draft stayed in and completed his next five passes, including Crabtree's TD.

After the hit, Smith was sacked three plays later and also clobbered again on a fourth-and-1 keeper. Doctors indicated to Harbaugh that might have been the play that caused injury.

Harbaugh said Smith would be evaluated this week per NFL concussion protocol. He wasn't available to speak to reporters. Smith, who has started 28 straight games, wound up 7 for 8 for 72 yards.

The 49ers didn't face Bradford in either meeting last season as the Rams quarterback missed six games with a high left ankle sprain. He had all kinds of extra opportunities this time.

"It's a weird feeling. I've never been a part of a game like that before," Bradford said. "I think the mood in this locker room is disappointment."

Late in the third period, the Rams benefited from Dashon Goldson's 15-yard unsportsmanlike conduct penalty for taking off his helmet. Then, defensive tackle Ray McDonald was flagged for a helmet-to-helmet hit on Bradford when he came in under the quarterback's chin, extending another Rams drive. Zuerlein kicked a 27-yard field goal.

The penalties and miscues were certainly uncharacteristic of San Francisco's defense.

Crabtree's touchdown midway through the second quarter gave him a TD reception in five straight games against the Rams. It was his third touchdown in two games, and all of his team-leading four TD catches have come in the last five games.

Kaepernick took over as Smith went to the bench to be examined by medical personnel and soon left for the locker room.

One wild play late in the first half summed up this wacky day. Punter Hekker completed a 21-yard pass to safety Rodney McLeod from the end zone after Chris Culliver didn't cover McLeod. Hekker did it again in the fourth quarter and had a notable 118.8 passer rating on the day.

On the Rams' 14-play, 18-yard drive over the final minutes of regulation, Hekker faked an end-around and threw a 19-yard completion to Kendricks on fourth-and-8 from the Rams 33.

But the Rams' defense couldn't get a stop, allowing Kaepernick to get his team back into field-goal range for Akers to tie it.

The Rams played without a pair of starters held out for an unspecified team rules violation, cornerback Janoris Jenkins and wide receiver Chris Givens -- and Fisher said afterward he isn't sure if they will play next week at home against the New York Jets.

Game notes
Rams LT Wayne Hunter played after missing two games with a back injury. ... Fans spelled out "THANK YOU VETERANS" in the stands with shiny red, white and blue cards after the first quarter. A special military coin also was used for the pregame toss on Veterans Day.