This is a young group that has demonstrated the ability to do that and that’s one of the things that I think has served this team well.”

The offense was able to piece together just enough drives to get into scoring range. Running back Kyren Williams matched his career-high of 29 carries, set against Buffalo, while gaining 108 yards. Once the balls dried out, Stafford was able to connect on several short passes to keep the chains moving, as well as a 51-yard bomb to Puka Nacua.

And when they got in range, kicker Josh Karty, a Stanford graduate who was playing in the Bay Area for the first time as a pro, was true on all four of his field goal attempts, even one that was tapped by a 49er player’s finger.

“One thing I’ve learned is that in the NFL, every kick counts,” Karty said. “It was kind of a max pressure of every kick matters in a low-scoring game like this, but honestly it’s getting to be clear to me that every kick is like that in the NFL.”

The 49ers were able to threaten as the Rams held a three-point lead late in the fourth. But quarterback Brock Purdy overthrew Jauan Jennings on a shot at the end zone, and veteran corner Darious Williams made the tumbling interception. The Rams’ offense worked the clock all the way down to 18 seconds before Karty made his final kick.

A horse collar tackle on the ensuing kickoff moved San Francisco within a Hail Mary’s distance of the end zone. But defensive coordinator Chris Shula called a blitz on the final play, and linebacker Christian Rozeboom got home for the win-sealing sack.

So that’s how the Rams won their seventh game in nine tries since the bye. A win without a touchdown for the first time since 2016. With Cooper Kupp failing to make a catch in a game for the first time since 2019.

They did it with grit, with Stafford setting the example by refusing to slide, by picking up two first downs via sneak, by being game when McVay called a read option at the goal line, by not throwing an interception for a career-best fifth straight game.

“He’s a soldier. He’s a warrior,” Williams said. “I was telling him throughout the whole game, ‘We need you, Nine, you’re a soldier.’ And he kept on responding, kept being who he is.”

“I think our team showed we can win football games anyway you want in about a four-day span,” Stafford added. “You gotta find ways to win the football game. You gotta be tough mentally and physically and we are that. ... They all count for one at this point and anyway you get them, we’ll take them.”

After sweeping the 49ers for the first time since 2018 — leading Williams to declare his team “the big brothers” in the rivalry — the Rams moved within a half-game of the Seattle Seahawks (8-5) for the lead in the NFC West, and with the season finale against Seattle looming, firmly control their own destiny.

But they also proved that, no matter the conditions on the field or the sky above, there’s still a way forward for these resilient Rams.

“They love football, they love preparing, they love the process,” McVay said. “We challenged our guys a few weeks back to really say … ‘Let’s make sure that we bring everything that we’ve got every single day and when we look back on this no matter what happens, there’s no regrets.’ And I think our guys have done that since then.”