Trent Williams and the San Francisco 49ers have reached a six-year, $138 million deal that will make him the highest-paid offensive lineman in NFL history, sources told ESPN’s Dianna Russini.

The deal, agreed to early Wednesday morning, has $55.1 million guaranteed and includes a $30.1 million signing bonus, sources told Russini.

The Niners also are pursuing a deal with free agent center Alex Mack, a source told Russini.

The 49ers traded for Williams on the third day of the 2020 NFL draft, sending a fifth-round selection and a 2021 third-round choice to the Washington Football Team.

Upon joining the Niners, they agreed to add a clause in his contract that meant they could not tag him this offseason. Williams, 32, went on to stabilize the left tackle position in place of the retired Joe Staley, starting 14 games and returning to his previous Pro Bowl form in the process.