SANTA CLARA (CBS SF) — After losing wide receiver Kendrick Bourne to free agency, the San Francisco 49ers weren’t going to risk seeing tackle Trent Williams also move on to a new team.

Bourne signed a three-year deal worth up to $22.5 million on Monday with the suddenly free spending New England Patriots.

READ MORE: Yuba County Agency Mulls Water Shipments to Bay Area Counties

So on Wednesday, they reached a 6-year, $138 million deal that makes Williams the highest-paid offensive lineman in NFL history. Of that sum, $55.1 million is guaranteed.

The Chicago Bears and Kansas City Chiefs were also pursuing Williams — who made 7 straight Pro Bowl appearances from 2012 to 2018 as a member of the Washington Redskins.

READ MORE: 'Let it Glow' SF Lights Up San Francisco To Revive Pandemic-Stricken Downtown

Resigning Williams wasn’t the only move the 49ers have made in free agency. They also reached agreement on new deals for Kyle Juszczyk — a 5-year, $27 million pact that makes him the highest paid fullback — and a cornerback Jason Verrett — a one-year deal worth $5.5 million with a $1 million bonus if he makes all-pro.

The Niners are also reportedly pursuing free-agent center Alex Mack, a veteran who has been named a six-time Pro Bowler during his 13-year NFL career. He played his college ball at UC-Berkeley.

When Williams was traded to the Niners before the 2020, he had the team agreed to add a clause in his contract that meant it could not tag him a franchise player this offseason.

MORE NEWS: Officials: Marin County Parents Knowingly Sent Child To School With COVID; 75 Students Quarantined

He stabilized the left tackle position after long-time mainstay Joe Staley retired. He started 14 games in 2020, finishing the season with the fourth-best pass block win rate (93.6%) among offensive tackles.