Brock Purdy doesn’t lack confidence. That much is clear. Even after watching every NFL team repeatedly pass him over in the draft until the San Francisco 49ers finally selected him with the last overall pick, the rookie quarterback knew he could play in the NFL. He knew he belonged.

Purdy faced a scoreboard deficit on Sunday for the first time since entering the action in Week 13 against the Miami Dolphins. The Las Vegas Raiders led the heavily-favored 49ers 24-14 entering halftime at Allegiant Stadium. That lead grew to 24-14, and it looked like a major upset was in the making.

The 49ers, riding an eight-game winning streak, remained calm. They believed in Purdy, who had confidently run the offense since taking over the starting role.

“I mean, I’ve always believed in myself from college to this point, preseason, all that kind of stuff,” Purdy told Albert Breer of TheMMQB. “I’ve always believed that I was good enough to play at this level, and all I needed was a shot and an opportunity. And so, for me, I don’t make it anything more than that, but I have guys around me, too. It’s not all Brock Purdy coming in and saving the day. I have a lot of leaders on this team, so I just gotta give them the ball, and they do the rest.”

Knowing that he wasn’t alone, Purdy kept the 49ers in the game with the defense struggling for the first time since the team’s last defeat, on October 23 against the Kansas City Chiefs. The unit allowed about 286 yards per game during the previous eight contests. Quarterback Jarrett Stidham and the Raiders offense racked up 500 total yards on the proud 49ers defense.

Purdy and his offense knew it was up to them if they wanted to keep the winning streak alive. And they knew they were up to the challenge.

“We have enough veterans on the team and leadership where guys like [RB Christian] McCaffrey and Juice [FB Kyle Juszczyk] and [TE George] Kittle and guys up front with [RT] Mike [McGlinchey] and [LT] Trent [Williams]like All right, we gotta put up points, and that’s it. So that’s sort of just where we were at with it, and we didn’t make it anything more than it was.”

The 49ers overcame the situation, trading punches with an underrated Raiders team and kicking a game-winning field goal in overtime to eliminate their one-time Bay Area rivals from playoff contention. It was a valuable learning experience for San Francisco’s defense and Purdy. That will only help the 49ers as they prepare for their playoff run.