Joe Staley hung up his cleats Saturday after 13 seasons with the 49ers. A storied career came to an end, allowing the 49ers to acquire another star left tackle, Trent Williams, in a trade with Washington.

Staley retiring right now also saved San Francisco a ton of money. 

The six-time Pro Bowler was slated to be under contract through 2021 after signing a two-year extension before last season. He was set to make $10.5 million guaranteed this season. If the 49ers opted to release Staley, he would have had an $11.5 million salary-cap hit and $11.05 million in dead money. But that changes now. 

Since Staley is retiring, the 49ers now only are responsible for his bonuses, which were $500,000 each of the next two seasons. And because Staley will be retiring before June 1, those bonuses accelerate to the 2020 season. 

Staley now will be a $1 million salary-cap hit for the 49ers this season. San Francisco saves $10.5 million in salary-cap space for the 2020 season, which takes us to Williams. 

The 49ers acquired Williams for a fifth-round pick this year and third-round pick next year. The 31-year-old is entering the final year of his contract after sitting out last year while working through a holdout with Washington, and dealing with the removal of a cancerous growth on his skull.

[RELATED: Rams’ McVay wanted to drink after 49ers' Williams trade]

 

Williams' base salary will cost $12.5 million for this season before he hits the open market. 

All in all, Staley's retirement certainly helped the 49ers add another star to protect Jimmy Garoppolo in every sense of the word.

[49ERS INSIDER PODCAST: Listen to the latest episode]