49ers defensive end Nick Bosa just signed the richest contract in the team’s history, ending his holdout with a five-year, $170 million deal that keeps the reigning Defensive Players of the Year in red and gold.

Give your San Francisco 49ers credit. Just 24 hours ago at this time, they were catching hell in the press for allowing the ongoing Nick Bosa holdout to go into its 43rd day. With just five days until the opening game, the 2022 Defensive Player of the Year was till not with the team.

But the 49ers were apparently quietly making progress behind the scenes, and calling no attention to the fact they were doing so. ESPN was first to report Wednesday that Bosa ended his holdout by signing a five-year, $170 million contract that makes him the highest-paid guy on the team, the highest-paid defensive player in the NFL, and the highest-paid San Francisco 49er of all time. (This surpasses the previous record of Jimmy Garoppolo’s 2018 extension, which was a five-year, $137.5 million deal.).

As the Chronicle notes, the deal comes with a $50 million signing bonus, which is on top of the $170 million. So Nick Bosa made himself $50 million just today. That paper also adds that $122.5 million of that money is guaranteed.

It’s not unusual for a 49ers training camp holdout to last for way too long. In 2020, George Kittle held out until August 13, linebacker Fred Warner held out until July 21 the following year, and receiver Deebo Samuel held out until July 31 last season. And now Bosa joins the team just five days before the opener at Pittsburg against the Steelers on Sunday, where the Niners were 2.5-point favorites before Bosa signed, and that line may move even more in their favor with Bosa’s return.

Yes, Bosa has a weird Trumper history. He initially refused to get the COVID-19 vaccine (he eventually got vaccinated), and his then-girlfriend in 2021 had highly racist social media posts surface (she has since dumped Bosa — doing so on TikTok, no less).

But to his credit, Bosa has intentionally toned down his own social media posts. And if he keeps leading the league in quarterback sacks, as he did last year with 18.5 of them, we cannot imagine 49ers fans having any problem with another five years of Nick Bosa on the defensive line.

Related: Reminder: 49ers Pass Rusher Nick Bosa’s Great-Grandfather Was Al Capone’s Bodyguard, Eventually Became Mob Boss

Image: SANTA CLARA, CALIFORNIA - JANUARY 22: Nick Bosa #97 of the San Francisco 49ers reacts as he takes the field prior to an NFL divisional round playoff football game between the San Francisco 49ers and the Dallas Cowboys at Levi's Stadium on January 22, 2023 in Santa Clara, California. (Photo by Michael Owens/Getty Images)