SANTA CLARA >> Brock Purdy carved an improbable path to fame, and now he has the fortune to go with it, a league source confirmed.

The 49ers are rewarding Purdy with the largest contract in team history — one rich with quarterback legacies — all in hopes he’ll lead them out of a 30-year Super Bowl drought. It’s a five-year, $265 million deal that averages $53 million per year that matches Detroit’s Jared Goff for the seventh-highest mark among NFL quarterbacks, as first reported by NFL Network.

The guaranteed loot is what truly reflects the 49ers’ multi-year commitment to Purdy: Of $181 million in guarantees, $165.05 million comes in the first three years.

Neither the 49ers nor Purdy’s agent, Kyle Strongin, immediately confirmed those financial figures.

Starting literally from the bottom of the 2022 NFL Draft, Purdy vaulted himself into the top-tier pay grade among his peers, and now he reaps the rewards for that three-year ascent highlighted by four playoff wins, including the 2023 team’s NFC Championship en route to a Super Bowl overtime defeat.

Financial details were not immediately available, but the 49ers have emboldened Purdy as the face of a franchise that’s deep into a younger-and-cheaper roster transition.

It’s one of the last pieces of the puzzle for the 49ers, who signed tight end George Kittle to a four-year contract extension worth $76 million and infused their roster with 11 draft picks and six undrafted free agents. First-round pick Mykel Williams signed a four-year, $25 million deal Thursday.

Purdy has spent the offseason laying low, working with teammates and showing up for Phase 1 of the 49ers’ offseason program before the contact was complete.

Praising Purdy has been the company line all offseason, from the 49ers’ hierarchy of owner Jed York, coach Kyle Shanahan and general manager John Lynch.

York, in the thick of negotiations, dubbed Purdy a top-10 quarterback in the NFL. “Especially when you combine him with Kyle (Shanahan) and you combine him with what we have, he’s a heck of a quarterback and want him to be here for a long, long time,” York said April 1 at the NFL’s annual meetings in Palm Beach, Fla.

Making quick work of contract negotiations was Purdy’s goal from the first day he became eligible for one, stating on Jan. 6: “I’m not really sure what it will look like or entail, but I know that I’m the guy for this organization and I can do what it takes to help lead us where we want to go.”

Purdy, 25, earned less than $1 million salary each of his previous three seasons, and he was entering the final year of his rookie contract (four years, $3.7 million). Because he was selected to the 2023 season’s Pro Bowl, his 2025 base salary jumped from $1.1 million to $5.2 million, prior to landing this multi-year extension.

The 49ers braced for Purdy’s pay raise, in part, by revamping their roster this offseason and losing 19 players to other teams, including nine starters.

“It’s just a math thing, right?” York said. “When you sit down with your guys and figure out, ‘Where you want to go, what do you want to build?’ and you make the decision you want to pay a quarterback that’s obviously been underpaid for his first three seasons, when you make that change, you have to make sacrifices somewhere and it’s a decision we made collectively.”

Purdy’s selection with the 262nd and final pick of the 2022 draft covered for the 49ers’ daring move a year prior, when they traded three first-round draft picks to the Miami Dolphins to gain the No. 3 overall pick and use it on Trey Lance. The 49ers ended up paying Lance close to $25 million for four career starts, then traded him to the Dallas Cowboys prior to the 2023 season after he lost out to Sam Darnold as Purdy’s backup.