LAS VEGAS — The 49ers didn't exactly go rolling into the new year in the same fashion they closed out 2022.
But after eight consecutive victories, this might have been the kind of game the 49ers needed to fully prepare them for the pressure of the NFL playoffs.
Rookie quarterback Brock Purdy and running back Christian McCaffrey helped the 49ers squeak out a 37-34 overtime victory against the Las Vegas Raiders on Sunday.
Robbie Gould atoned for a missed field-goal attempt at the end of regulation with a 23-yard field goal, coming after Tashaun Gipson's interception and 56-yard return. Gould's kick came with 6:53 remaining in the 10-minute overtime period.
The 49ers (12-4) moved into the NFC's No. 2 playoff seed heading into the final week of the regular season. They own the conference tiebreaker over the Minnesota Vikings (12-4), who lost to the Green Bay Packers.
Here are three takeaways from the 49ers’ Week 17 game against the Raiders:
Purdy faces NFL adversity for first time
San Francisco 49ers
The 49ers hadn't trailed in any of Purdy’s first three starts. What came of his fourth start was his first come-from-behind victory.
When Purdy entered the Week 13 game against the Miami Dolphins, the 49ers trailed 7-3. They took the lead on Purdy’s first drive, and hadn't trailed in any game since.
That changed against the Raiders.
He led a drive down the field at the end of regulation with completions to Brandon Aiyuk of 12, 18, 11 and 11 yards. Kicker Robbie Gould missed a 41-yard field-goal try wide right, though, as time expired in regulation.
Purdy completed 22 of 35 passes for 284 yards and two touchdowns with one interception. And he was at the controls as the 49ers marched 75 yards on five plays for the go-ahead TD, which running back Jordan Mason scored on a 14-yard run.
The 49ers fell behind 24-14 in the third quarter, forcing Purdy to play catch-up. And with the 49ers still trailing late in the third quarter, Purdy’s deep pass for George Kittle was intercepted by Raiders defensive back Amik Robertson.
But the 49ers got the ball back on Drake Jackson’s interception a short time later and settled for a Gould field goal, which tied the score at 24 with 12 minutes to play.
Purdy got off to a good start in Las Vegas. He threw two touchdown passes in each of his first four games, and it didn't take him long to match that average Sunday, as he connected with Aiyuk and Kittle in the first half. It was Purdy’s second touchdown throw to Aiyuk and his fifth to Kittle.
Rough day for NFL’s top defense
This was supposed to be a mismatch.
The Raiders turned to their No. 2 quarterback, Jarrett Stidham, after banishing Derek Carr for the remainder of the season.
The inference was that Raiders coach Josh McDaniels was folding with two games remaining. But it certainly didn't look that way from the beginning.
Stidham, making the first start of his four-year NFL career, played well until Gipson's interception in overtime. Nick Bosa forced the bad throw with a pressure.
The 49ers came into the game allowing a league-low average of 290.3 yards per game. Las Vegas rolled up 134 yards after first 15 minutes -- the most yards the Raiders have totaled in the first quarter of a game this season.
Stidham and the Raiders continued to solve the 49ers’ defense through the end of the first half. Stidham capped it with a nice 4-yard fade to Davante Adams, who made a beautiful catch in the end zone against 49ers cornerback Charvarius Ward's tight coverage.
The 49ers entered Sunday’s game allowing 100 yards or more rushing just three times this season. At halftime, the Raiders had 101 yards on 20 carries.
Then, the Raiders opened the second half by taking advantage of one of the many blown assignments in the 49ers' secondary, as Adams got free for a 60-yard touchdown reception.
The 49ers entered the game allowing NFL lows of 290.3 yards per game and 15.3 points. But the Raiders (6-10) piled up 500 total yards and might have exploited some vulnerabilities with the 49ers' pass defense.
Stidham completed 22 of 34 passes for 365 yards and three touchdowns with two interceptions.
McCaffrey tops Craig’s six-year mark
So much for the whole notion that the 49ers would scale back Christian McCaffrey’s usage with the team’s playoff spot already secure.
McCaffrey was the central figure of San Francisco's offense Sunday, as the team hit the accelerator with the No. 2 seed in sight.
The All-Pro running back carried the ball 19 times for 121 yards and one touchdown, and also made six receptions for 72 yards.
RELATED: How Griese has helped studious 49ers QB Purdy's development
McCaffrey got off to a hot start with a 37-yard run on a third-and-3 situation on the 49ers’ first drive of the game to set up a touchdown. He had a 14-yard TD run that pulled the 49ers within three points in the third quarter.
McCaffrey’s 38-yard catch-and-run set up Jordan Mason’s go-ahead TD with 2:17 remaining in regulation.
His second reception of the game was the 435th of his career, to top former 49ers star Roger Craig’s mark for most receptions for a running back in his first six NFL seasons. Craig had 434 receptions in six seasons after breaking into the NFL in 1983.
Also in 1983, Craig became the first player in NFL history to rush for 1,000 yards and have 1,000 yards receiving. He had a league-best 92 catches for 1,016 yards.
McCaffrey joined Craig and Marshall Faulk in the exclusive 1,000-1,000 club in 2019 with the Carolina Panthers when he rushed for 1,387 yards and had 1,005 yards receiving.