SANTA CLARA, Calif. (AP) When Trent Williams was sitting out the 2019 season while in a dispute with the front office in Washington, he figured he'd have the choice of either getting paid or being somewhere that made him happy.
Less than two years later, he found both.
After picking up his Pro Bowl level play following a trade last April to San Francisco where he reunited with a coach he considers like family, Williams got rewarded last week when the 49ers locked him up with a six-year, $138.1 million contract that was the richest given to an offensive lineman in NFL history.
''I thought it would be one or the other. I thought either I'd get a lot of money and be somewhere where I hated to be or I'd be somewhere I'd love to be, playing for a discount,'' Williams said Tuesday after officially signing the contract. ''I definitely didn't think it would be both.''
When free agency started last week, Williams wasn't sure things would work out the way he wanted in San Francisco where he hoped he could remain with coach Kyle Shanahan, who worked for his father on the staff that drafted Williams in Washington in 2020 and has an offensive system that caters to Williams' strengths.
As talks heated up with Kansas City with a chance to block for Patrick Mahomes and the Chiefs, Williams called Shanahan and told him to press Niners negotiator Paraag Marathe to get a deal done with agent Vince Taylor.
''Once I got the hunch Kansas City was ready to make it official, I called Kyle,'' Williams said. ''I couldn't get it out and tell him. I said, `We just need to hurry it up, if you get my drift. Tell Paraag and Vince to work something out. I need to make my decision for everything to get on the table.''
About an hour later, the deal with the 49ers was done, giving Williams the largest signing bonus ever for an offensive lineman at $30.1 million, as well as $55.1 million guaranteed on the deal worth $10,000 a year more than the previous record for an offensive lineman, set last year by Green Bay's David Bakhtiari.
The deal is back-loaded for Williams, who turns 33 in July. He will get about $60 million over the first three years, with the rest coming in the final three seasons when he is 36, 37 and 38 if the 49ers decide to keep him that long since none of that money is guaranteed.
Williams believes that only adds motivation for him to maintain his high level of play.
''I've been to the Pro Bowl last eight years I've touched the field. I'm not really worried about a decline at the moment,'' Williams said. ''I know six years is a lot to actually go. I do think it's possible. I do appreciate the 49ers for adding that incentive to go and get that, that sixth year.''
Williams had sat out the entire 2019 season in Washington. He was at odds with the organization when he refused to play because he said he distrusted the medical staff and front office because of a botched cancer diagnosis.
The Niners acquired Williams from Washington during last year's draft for a 2020 fifth-round pick and 2021 third-rounder.
He showed a few signs of rust early, but quickly got back to his usual form and earned his eighth Pro Bowl selection. Williams was graded as the top left tackle by Pro Football Focus and is now being paid that way as well.
The team didn't have nearly as much success, winning just six games in an injury-riddled season after playing in the Super Bowl the previous season.
But with key players like Williams; fullback Kyle Juszczyk; defensive backs Jason Verrett, Jaquiski Tartt and Emmanuel Moseley; and defensive lineman D.J. Jones all back and quarterback Jimmy Garoppolo, tight end George Kittle and defensive end Nick Bosa healthy, Williams believes the Niners have the roster to compete with the teams he watched in the playoffs a few months ago.
''I just know that if my team was in tact, I know that we would be one of those teams that were either fighting for position or fighting for that Lombardi,'' he said. ''So I'm excited. I'm ecstatic. I think we got every piece of the puzzle that we need to win this division and the conference.''
NOTES: The 49ers also re-signed DL Jordan Willis to a one-year deal. Willis had 2 1/2 sacks in seven games after being acquired in a midseason trade from the Jets.
More AP NFL coverage: https://apnews.com/hub/NFL and https://twitter.com/AP-NFL