SANTA CLARA, Calif. -- An exhilarating, game-winning drive that put the San Francisco 49ers in position to seize the top seed in the playoffs next week would normally be reason to celebrate.
The mood for the 49ers was far from joyous following a 34-31 victory Saturday night over the Los Angeles Rams because teammates were more concerned about the well-being of third-string quarterback C.J. Beathard, whose younger brother Clayton was fatally stabbed earlier in the day at a Nashville bar.
"It was definitely the toughest game of my career," said an emotional George Kittle, who played with Beathard in college at Iowa and was close to the family.
"Today was absolutely terrible, for me the entire day. It sucked all around. Overall it was just kind of a brutal day. We got that one for C.J. and I'm so happy we were able to do it."
It didn't come easy, as it took Jimmy Garoppolo converting a pair of conversions on third-and-16 to set up Robbie Gould's game-winning 33-yard field goal with no time left to eliminate the defending NFC champion Rams from playoff contention.
Garoppolo made up for a mostly pedestrian game for the 49ers (12-3) by delivering two big throws on the final drive after taking his fifth and sixth sacks.
"To convert two of those the way we did it was pretty incredible," Garoppolo said.
San Francisco had failed on 50 straight third downs when needing at least 16 yards to convert since last doing it in Week 3 in 2017.
"Usually it's such a low percentage that you don't even try on third and 16," coach Kyle Shanahan said. "Usually you just try to survive the down and get half of it."
The Niners then ran down the clock before Gould made the kick that knocked the Rams (8-7) out of the playoffs. Minnesota became the fifth team to clinch a berth in the NFC with Dallas and Philadelphia battling for the final spot.
"It's extremely disappointing," Rams quarterback Jared Goff said. "You never envision something like this when you start the year. It's not even close to the standard we want to hold. It's sickening."
The victory kept the Niners in control in the race for the NFC's top seed and home-field advantage throughout. They still need to win next week at Seattle to win the NFC West, otherwise they will be relegated to wild-card status.
Garoppolo finished 16 for 27 for 248 yards with one touchdown and two interceptions.
Goff connected on a 22-yard TD pass to Cooper Kupp in the third quarter to put the Rams ahead 28-24. The defense had throttled the Niners, holding them to four punts, one interception and only two first downs in the second half before San Francisco took over at the 9 midway through the fourth quarter.
Garoppolo hit Kittle on a 36-yard pass to start the drive and then connected with Ross Dwelley on a 25-yarder that also featured a personal foul on Eric Weddle. Three plays later, Garoppolo scrambled on third down to give Kittle time to work free and then found him in the front of the end zone for the touchdown that made it 31-28.
Goff responded and drove the Rams to a tying 52-yard field goal with 2:30 to play after Marcell Harris dropped a potential interception for San Francisco.
But the Rams couldn't get another stop and lost
"Bottom line is you had two third down and I want to say 16s where we had a chance to get those guys off the grass, the way that we had played the whole night," coach Sean McVay said. "I think those two plays are not indicative of the effort that our defense gave and it's unfortunate that they ended that way, because they had put together a really good performance against a tough offense."
The offenses controlled the game early with Goff throwing a 10-yard TD pass to Brandin Cooks on the opening drive and Todd Gurley scoring on two short runs to stake the Rams to a 21-10 lead.
But Raheem Mostert answered Gurley's second score with a TD run of his own. The defenses then buckled down starting when Fred Warner intercepted a swing pass from Goff in the closing minute of the first half and returned it 46 yards for a score that put San Francisco up 24-21 at the half.
The Niners defense then held firm after Garoppolo's second interception set up the Rams in prime position to start the second half. But an intentional grounding penalty led to a 52-yard missed field goal by Greg Zuerlein.
Mostert scored on a 16-yard run in the second quarter to give him a rushing touchdown in five straight games. He's the first 49ers player to do that since Derek Loville had a six-game streak in 1995. The only other San Francisco players to do that are Joe Perry (seven games in 1953-54) and Hugh McElhenny (five in 1954).
Rams: Jalen Ramsey left with a knee injury in the first half and was initially listed as doubtful to return but came back the following series. ... LB Kenny Young (ankle) and RB Darrell Henderson (ankle) also left with injuries.
49ers: S Tarvarius Moore left the game with a concussion.
Rams: Host Arizona on Sunday.
49ers: Visit Seattle on Sunday.
More AP NFL: https://apnews.com/NFL and https://twitter.com/AP-NFL
Buffalo Bills WR Cole Beasley addresses virus protocol concerns with NFLPA
Buffalo Bills receiver Cole Beasley says he has spoken with the NFLPA after complaining about its jointly agreed-to policy with the NFL regarding COVID-19 protocols.
Cardinals' Humphries giving back to his community with fresh food boxes
D.J. Humphries' foundation, Pee Wee's House, delivers fresh food boxes in his hometown of Union, South Carolina.
Highlighting Joey Bosa, the Chargers' relentless pass-rusher
Check out the explosive highlights of Chargers' Joey Bosa, a three-time Pro Bowler.
Zach Wilson clears 'awesome' hurdle in sprint to New York Jets' starting job
The Jets are committed to being a Zach Pack in Week 1, so it's a good thing the rookie has shown a strong command of the offense this offseason.
Texans will run the ball more because of pass-game limitations
The Texans called a run less than 30 percent of the time in 2020. They will have to be more run-heavy without Deshaun Watson under center in 2021.
The Smiths 3.0: Packers' Preston, Za'Darius back, and with help from Rashan Gary
The Packers' unrelated-but-inseparable outside linebacker duo returns after an uneven Year 2, motivated to energize the defense.