Milwaukee will be paying Christian Yelich until 2042, when the All-Star outfielder is 50 years old.

Yelich’s $215 million, nine-year contract with the team calls for Brewers to defer $4 million each year from his $26 million annual salary from 2022-28. The deal includes a $20 million mutual option for 2029 with a $6.5 million buyout, and $2 million of the buyout would be deferred.

If the buyout is owed, the $30 million in deferred money would be paid in 12 installments of $2.5 million each July 1 from 2031-42. If the buyout is not owed, Yelich would receive the $28 million in 11 installments of $2,333,333 each July 1 from 2031-41 and a final payment of $2,333,337 on July 1, 2042.

Yelich’s new deal includes salaries of $12.5 million for this year and $14 million in 2021, the same as in the last two guaranteed seasons of the nearly $49.6 million, seven-year contract he signed in March 2015 with Miami. None of that money will be deferred.

Yelich would get $100,000 for winning the MVP award, $75,000 for finishing second in the voting and $50,000 for third. He won the 2018 NL MVP and was second in last year’s balloting.

He would get $50,000 each for All-Star selection, World Series MVP, Silver Slugger, Hank Aaron Award and Comeback Player of the Year. He would get $25,000 apiece for League Championship Series MVP and Gold Glove.

As part of the agreement announced Friday, Yelich has the right not to be traded without his consent. He also gets four premium tickets for 20 mutually agreed upon regular-season games annually.

A 28-year-old outfielder, Yelich is a two-time All-Star and a one-time Gold Glove winner. He would have been eligible for free agency after the 2021 or 2022 season, depending on a team option in his previous contract.

Yelich’s contract includes the largest guarantee given by the Brewers, topping the $145.5 million for Ryan Braun from 2011-20.