49ers vs. Rams: Key moments and analysis of San Francisco’s dramatic last-second win

It looked like the 49ers were going to cough up the game after they allowed 17 points from the Rams over 3:21 midway through the second half.

But they held on, thanks to strong play from the defense, a clutch drive from quarterback Nick Mullens, smart decision-making from Kyle Shanahan and a big day from receiver Deebo Samuel in his first action in more than a month, helping the 49ers improve to 5-6 and increase their minuscule playoff chances ever so slightly.

Here’s our running game story from Sunday’s action.

First quarter

After the Rams won the toss and deferred, the 49ers opened the game with a three and out, but San Francisco got the ball back at midfield following Malcolm Brown fumble forced Jimmie Ward. Defensive linemen Kevin Givens got the recovery after getting penetration on two earlier running plays.

But San Francisco gave the ball back three plays later when Mullens had his pass deflected by All-Pro defensive lineman Aaron Donald, falling right to rookie safety Jordan Fuller. It led to a 48-yard field goal for L.A. and kicker Matt Gay to give the Rams a 3-0 lead midway through the quarter.

Deebo Samuel got the 49ers going with a 33-yard run on a sweep to the left side and a 26-yard reception to the Rams’ 8-yard line. Then Mostert sped around the left edge to give San Francisco a 7-3 lead in his first action since the last time these teams played Oct. 18. It was Mostert’s third touchdown of the season.

The 49ers forced a second Rams turnover soon after, with Goff airmailing his target and finding Richard Sherman in his first game since the season opener. He returned it 19 yards back to L.A.’s 45-yard line.

However, the 49ers gave the ball right back to the Rams on their first play when Jeff Wilson Jr. coughed up a fumble, only the Rams couldn’t take advantage and were forced to punt.

Second quarter

Defensive end Kerry Hyder made a big play for the 49ers’ defense getting sack No. 6.5 on the season as the 49ers and Rams traded punts on five straight possessions until Ward forced his second fumble of the first half, his first since 2018, when Goff tried to scramble. It was recovered by Hyder, who brought it out to midfield.

Then the 49ers converted their first third down of the game when Mullens rolled left and found Kendrick Bourne, who bounced off a defender, for 18 yards, setting the offense up in field goal range, but Robbie Gould missed from 50 yards wide right.

Third quarter

The second half could not have gotten off to a better start for the 49ers. Rookie defensive tackle Javon Kinlaw, who had his best game of the season in the last game against the Saints, intercepted Goff and rumbled 27 yards for his first career touchdown to give San Francisco a 14-3 lead on the second snap of the frame. It appeared Givens hit Goff as he threw, with the ball going right to the big defensive tackle.

The 49ers forced another punt and got back into Rams’ territory thanks to another big play from Samuel, who continued to demoralize the Rams by breaking arm tackles.

It led to Gould hitting from 46 yards to make it a 17-3 game after a Mullens fumbled was successfully challenged by coach Kyle Shanahan and turned into an incomplete pass, saving the 49ers seven yards and making it an easier kick.

The Rams then put together their longest drive of the game, 53 yards, including a 33-yard catch and run for Cooper Kupp, but couldn’t get in the end zone, and kicked another field goal to make it 17-6. It was L.A.’s 12th possession without reaching the red zone.

Then Aaron Donald, who had quietly been dominating the 49ers’ offensive line, made one of the biggest plays of the game by forcing a fumble of Mostert that was recovered by Troy Hill and brought back 20 yards for a touchdown to make it a four-point game, 17-13.

Donald made another big play with a sack to open the next series, helping force a 49ers punt. Then little-used running back Cam Akers burst through the middle of the 49ers defense for a 61-yard gain to put L.A. in position to take the lead at the 16-yard line on the last play of the quarter.

Fourth quarter

The Rams took the lead on Akers’ 1-yard touchdown run three plays later, 20-17, giving them 17 points in 3:21 of game time and their first lead since early in the first quarter. The 49ers didn’t help themselves with a third straight unsuccessful drive leading to another punt.

The 49ers later found themselves back inside field goal range thanks to completions to Bourne and a 20-yard pass to fullback Kyle Juszczyk along the left sideline. They couldn’t convert on a third-and-6 over the middle that Jerick McKinnon couldn’t haul in through traffic, leading to Gould hitting a 44-yard field goal to tie things at 20 with just over three minutes remaining.

San Francisco’s defense then held tough, forcing another Rams punt outside of the two-minute warning. They got the ball back at their 20 with 2:10 to go and a chance to win it with points.

The 49ers got to the edge of field goal range, thanks to another long catch-and-run from Samuel. But they didn’t get a first down on a run up the middle on third down, and then tried a run to Juszczyk on fourth that barely got the first down with 28 seconds remaining to the 37. The team still needed to get more yards for Gould as it would be a 55-yard attempt from that spot.

Mullens, on first down, threw a low incompletion to Bourne, and then hit Samuel for a crucial 4-yard gain on a slant route, followed up by 4-yard run from Mostert, setting up the game-winning 47-yard field goal attempt.

Inexplicably, star cornerback Jalen Ramsey ran offsides before the snap, making it a 42-yard try, which he hit, giving the 49ers’ their fifth win of the season, and fourth straight overall against Sean McVay and the Rams.