It wasn't pretty, but it wasn't a tie either.
For the second time in three weeks, the St. Louis Rams and San Francisco 49ers battled past regulation in a hard-fought NFC West tussle.
But unlike their Week 10 meeting, Sunday's eerily similar tilt ended with a winner, as Greg Zuerlein connected on a 54-yard field goal with 26 seconds remaining in OT to give the Rams a 16-13 victory at Edward Jones Dome.
Both Zuerlein and David Akers missed overtime-field goals during a 17-17 outcome three weeks ago. Akers was off the mark again in the rematch, narrowly pushing a 51-yard try wide right with 4:11 remaining in the extra session.
The Rams gained one first down after the miss, and on 4th-and-inches from the San Francisco 37-yard line, Zuerlein answered the call to give the Rams their second straight win and the rookie's seventh make of 50-plus yards this year.
St. Louis (5-6-1) remained unbeaten against division foes despite being held to 293 yards. Steven Jackson, one week after amassing a season-high 139 rushing yards, was limited to 48 on 21 carries, while Sam Bradford completed 26-of-39 passes for 221 yards.
As the Rams sputtered on offense, Janoris Jenkins came up big on the other side of the ball. The rookie cornerback, who returned two interceptions for TDs in a win over the Cardinals last week, scored on a fumble recovery with 3:04 to play in the fourth quarter.
This was the first loss for division-leading San Francisco (8-3-1) since a 26-3 thumping by the New York Giants on Oct. 14.
Colin Kaepernick, in his third game as starter after Alex Smith suffered a concussion against the Rams, had two costly mistakes in the setback. The inexperienced signal-caller was whistled for a safety and lost a fumble that resulted in Jenkins' touchdown and the tying two-point conversion.
"I gave up those points that are on the scoreboard for the Rams. It's 100- percent my fault," said Kaepernick. "There were plays that happened that I shouldn't have let happen."
Kaepernick threw for 208 yards on 21-of-32 throws and added 84 yards on nine carries, while Frank Gore ran for the only offensive touchdown of the game and finished with 58 yards on 23 carries.
The 49ers could not hang on to their 10-2 lead late in the fourth quarter.
On 3rd-and-3 from San Francisco's own 17-yard line, Kaepernick appeared to be running an option to the left and was forced into a quick pitch by a charging Quintin Mikell. The toss sailed high over the head of Ted Ginn and bounced inside the five. Ginn did not dive for the loose ball, allowing Jenkins to swoop in for the recovery and the touchdown with 3:04 remaining.
The score made it 10-8 before the point-after, and the two-point conversion was moved back five yards for a false start. Nonetheless, the Rams tied it when Lance Kendricks ran a drag across the field, caught Bradford's pass at the 2-yard line and carried Patrick Willis into the end zone.
Kaepernick shook off the mistake and sprinted down the right sideline for a 50-yard gain down to the St. Louis 14-yard line. A holding penalty hindered the drive, and Akers booted a go-ahead 33-yard field goal with 1:34 showing.
The Rams had enough time to get into field goal range, thanks in part to two first-down scrambles by Bradford and an unnecessary roughness penalty on Dashon Goldson. Zuerlein, who missed a 58-yard try in overtime three weeks ago, was true from 53 yards out as time expired.
In overtime, both teams punted on their initial possessions, and John Hekker shanked a 14-yard punt to set San Francisco up at midfield midway through the extra session.
An incomplete pass on 3rd-and-6 at the St. Louis 33 brought out Akers, and the veteran failed to connect.
Chris Givens' 11th catch of the game was his biggest, moving the chains with a 6-yard grab on third down to reach the San Francisco 46. Jackson totaled nine yards on the next three runs, and Zuerlein ended it shortly thereafter.
"We found a way to win," Rams head coach Jeff Fisher said. "We're a young team that's starting to learn how to win tough games."
The only fruitful drive of the opening half came in the first quarter when San Francisco converted three third downs during its 11-play, 60-yard march. Gore ran for 23 yards on the first play and ended it with a 1-yard plunge over the goal line.
St. Louis crossed midfield for the first time with a minute to go in the half, but Zuerlein was wide right on a 58-yard try to keep it 7-0.
The Rams gained just four first downs the entire opening half, then had four on their first possession after the break. They came away empty-handed though, as Bradford's pass intended for Austin Pettis in the right corner of the end zone was knocked away by Tarell Brown on 4th-and-1 from the 4-yard line.
On the ensuing possession, with the ball at his own 17, Kaepernick dropped back and was chased out of the pocket and into the end zone by James Laurinaitis and Jenkins. Kaepernick's pass out-of-bounds was ruled to have not reached the line of scrimmage, resulting in an intentional grounding penalty in the end zone and a safety with 4:27 on the clock.
The Rams did little on offense following the free kick, and Hekker's 55-yard punt pinned the Niners at their own 1-yard line. Michael Crabtree's 22-yard catch brought the visitors out of the shadow of their own end zone, and his 30-yard grab moved the ball into enemy territory.
The drive stalled in the red zone, and Akers kicked a 23-yard field goal with 8:43 remaining in the game.
This was the first time since 2004 two teams played overtime games twice in the same season. That year, the 49ers beat the Cardinals twice in OT ... St. Louis is 4-0-1 against the NFC West ... Zuerlein has made 7-of-11 from 50-plus yards this season ... Givens had 92 receiving yards, while Crabtree led the 49ers with seven catches for 101 yards ... San Francisco's Aldon Smith recorded a sack to match Fred Dean's single-season franchise record of 17 1/2 sacks ... San Francisco was 7-1-1 in its previous nine meeting with the Rams ... The 49ers host the Miami Dolphins next Sunday, while the Rams head to Buffalo for a game against the Bills.