Joshua Karty kicked four field goals and the Los Angeles Rams survived a slugfest a week after winning a shootout, beating the San Francisco 49ers 12-6 on Thursday night in a key game in the NFC West race.
Four days after beating Josh Allen and Buffalo 44-42 in the NFL's highest-scoring game of the season, the Rams (8-6) outlasted the 49ers (6-8) on a rainy night to move within a half-game of division-leading Seattle.
Los Angeles won a game without a touchdown for the first time since 2016.
The Niners led 6-3 heading into the fourth quarter but came up short, dealing a major blow to the dwindling playoff hopes for the defending NFC champions.
This marked the fourth time this season that the Niners lost to a division opponent after leading by at least three points in the fourth quarter, making them the first team to do that since New England in 2000 in coach Bill Belichick's first season with the Patriots.
Los Angeles Rams
Passing: Matthew Stafford, 16/27, 160 yards
Rushing: Kyren Williams, 29 carries, 108 yards
Receiving: Puka Nacua, 7 catches, 97 yards
San Francisco 49ers
Passing: Brock Purdy, 14/31, 142 yards, 1 INT
Rushing: Isaac Guerendo, 16 carries, 57 yards
Receiving: George Kittle, 4 catches, 61 yards
Karty capped a 17-play drive with a game-tying 23-yard field goal early in the fourth quarter and then hit a 27-yarder after Matthew Stafford connected on a 51-yard pass to Puka Nacua.
The Niners then drove into field-goal range but Brock Purdy was intercepted on a deep pass into the end zone by Darious Williams, helping the Rams secure their first series sweep against the 49ers since 2018.
Stafford then led a clock-killing drive that was capped by Karty's fourth field goal with 18 seconds to play. Stafford went 16 for 27 for 160 yards with almost all of the damage coming in the second half.
Purdy finished 14 for 31 for 142 yards as the Niners failed to score a touchdown in a game for the first time since 2019.
The first half was played in a downpour and it had a major impact on the offensive performances with neither team able to move the ball.
The Rams had no first downs on their first four drives of a game for the first time since 2013 before getting a late field goal to level. The Niners went three-and-out three times and got one field goal.
The teams combined for 11 punts, nine first downs and 197 yards four days after they both had season highs in points.
The rain mostly stopped at halftime but the offenses still struggled.
Meanwhile, in a further headache for 49ers head coach Kyle Shanahan, linebacker De'Vondre Campbell refused to enter the game in the third quarter.
Campbell had started all-but one of the season's opening 13 games but lost his starting role when Dre Greenlaw returned from an Achilles tendon injury sustained in February's Super Bowl loss to the Kansas City Chiefs.
Greenlaw had eight tackles in the first half but left the game in the third quarter with soreness in his Achilles tendon. That's when Campbell refused to enter the game, according to Shanahan.
"He said he didn't want to play today," said Shanahan.
Shanahan said he has never seen that before in his coaching career and said the team will "figure out something" on how to deal with it going forward.
Campbell walked to the locker room, leaving his team-mates bewildered and angry.
"He's a professional," cornerback Charvarius Ward said. "He's been playing for a long time. If he didn't want to play he shouldn't have dressed out. He could have told them that before the game. I feel like that was some selfish stuff that he did.
"It definitely hurt the team. Dre went down and we needed a linebacker. For him to do that, that's some selfish stuff to me in my opinion. He's probably going to get cut soon."
The 31-year-old Campbell signed a one-year, $5m deal in the offseason with San Francisco after being cut by Green Bay in March.
In the pre-Christmas Week 16 matches on December 22, the Rams head to New York to face the Jets while the 49ers head south-east to take on the Miami Dolphins.
Sky Sports+ has officially launched and will be integrated into Sky TV, streaming service NOW and the Sky Sports app - giving Sky Sports customers access to over 50 per cent more live sport this year at no extra cost. Stream The new EFL season, Test cricket and more top sport with NOW.