The 49ers got their man.
And Trent Williams got his answer.
Williams — and the rest of the football world — finally was able to see what happens when a top-flight left tackle near his prime is able to test the free-agent market. It had never happened until the doors opened Monday on the NFL open negotiating period.
Stay in the game with the latest updates on your beloved Bay Area and California sports teams! Sign up here for our All Access Daily newsletter.
The 49ers paid a price. It was a huge price. And they knew it was coming.
But if Williams remains healthy, it should be worth it.
After all, Williams was the largest 49ers free agent, in every imaginable way, and he alone was going to be the difference between a successful offseason and one in which the 49ers would have to do a lot of scrambling to fill out their offensive line.
Williams is remaining with the 49ers on a six-year, $138.06 million contract that includes $55.1 million guaranteed, according to Elite Loyalty Sports, the firm that represents Williams. The deal reportedly includes a $30.1 million signing bonus.
Williams becomes the highest-paid offensive lineman in the league. His average annual pay of $23.01 million tops Green Bay left tackle David Bakhtiari’s $23 million yearly average. Bakhtiari signed his extension in November.
For a little perspective, NFL All-Decade tackle Joe Staley was paid a total of approximately $90 million in salary and bonuses during his 13 seasons with the 49ers.
Williams sat out the 2019 season due to a cancerous growth on his scalp. He got his wish to get out of Washington with an offseason trade to the 49ers. He slid right into the spot Staley held in capable hands for so long.
San Francisco 49ers
Find the latest San Francisco 49ers news, highlights, analysis and more with NBC Sports Bay Area and California.
Williams’ unique blend of size, strength, agility, athleticism, technique and knowledge of the game make him as perfect a fit for Kyle Shanahan’s demanding system as any offensive lineman in the NFL.
Williams appeared in 14 games in his first season with the 49ers and was chosen to his eighth Pro Bowl in 10 seasons.
Now, that the 49ers have their left tackle issue solved, the rest of the pieces on the offensive line can fall into place.
If the 49ers return their offensive line intact from last season, they will be improved with Daniel Brunskill at center and Colton McKivitz at right guard. But the 49ers are not likely to sit back and hope the experience both players gained last season will lead to more consistent play in 2021.
In fact, Williams seems to have an idea about how the 49ers can improve. He posted a photo of himself and teammate Mike McGlinchey to his Instagram story after his re-signing. He tagged Alex Mack, the All-Decade center who is a free agent.
The 49ers and Mack reportedly have agreed to a contract, NFL Media's Ian Rapoport reported Wednesday.
Mack, 35, spent seven seasons with the Cleveland Browns and five with the Atlanta Falcons. He played for Shanahan at both of those stops. Mack told NBC Sports Bay Area earlier this offseason the idea of playing again for Shanahan with the 49ers is “enticing.”
RELATED: 2021 NFL free agency tracker: Latest rumors, signings and trades
If Williams had gone elsewhere in free agency, the 49ers would have been dealt a severe blow. There was virtually no way to land a player who even approached Williams’ immense talent and intangibles in free agency or the draft.
Now, the 49ers can remain patient in free agency and pick off some veteran players who fill certain needs.
It also leaves everything wide open for the draft, which is scheduled for Thursday, April 29 through Saturday, May 1.
The 49ers still could invest the No. 12 overall pick in an offensive lineman, such as Northwestern’s Rashawn Slater. But the 49ers are not desperate. They no longer need someone who has to step in at the most demanding of the positions on the offensive line.
Whatever the cost, it was worth it.