Aaron Judge agreed to a massive nine-year, $360 million deal to remain in pinstripes after an MVP-winning season in which he launched 62 home runs with a slash line of .311/.425/.686.

Judge’s contract with the Yankees immediately places him in the upper echelon of the highest paid athletes in the world, and the figures above the dotted line make the deal one of the richest both by total value and in average annual value.

Where does Judge’s new deal rank all-time among athlete contracts? Here’s a look:

MORE: MLB winter meetings tracker

Biggest contracts by total value

This is where Judge gets closest to the top.

The $360 million set to go Judge’s way is the largest contract signed by an MLB free agent in history. It exceeds Bryce Harper’s 13-year, $330 million deal signed to the Phillies in 2019 and an identical deal signed by Carlos Correa to the Giants ahead of the 2023 MLB season. In MLB, only Mike Trout’s 12-year, $426.5 million Angels deal and Mookie Betts’ 12-year, $365 million contract with the Dodgers will pay the players more.

Among all athletes, only six total have signed more lucrative deals than Judge. The list is topped by Lionel Messi, who signed a four-year, $674 million contract with FC Barcelona in 2017. Chiefs quarterback Patrick Mahomes has the North American sports record with his 10-year, $503 million contract that he inked in 2020.

MORE: 15 worst MLB free-agent signings of all time

Likely soon to be adding to the list will be Cristiano Ronaldo, who is expected to sign a 2.5-year deal with Al Nassr that will pay him $525 million in total value.

Of the 11 highest-valued contracts in sports, eight have been signed by Major League Baseball players and teams.

And there are plenty more MLB stars that have signed huge contracts. Just this offseason, Judge, Devers, Correa (Mets) and Trea Turner (Phillies) have agreed to four of the 12 most lucrative contracts in MLB history.

Of the 11 highest-paying contracts in MLB history, the Padres, Phillies and Yankees each have signed players to two of the highest-paying deals. The Yankees also took on the massive contract Giancarlo Stanton originally signed with the Marlins.

Here’s a look at the highest-paying deals in MLB history.

But plenty of those deals were signed as extensions rather than open-market contracts. Part of what makes Judge’s contract historic is that he inked his deal as a free agent rather than while he was still with the team.

No contract signed in free agency has been larger than Judge’s to this point.

Biggest contracts by average annual value

When it comes to average annual value, Judge still trails a number of athletes, though he does still come away with at least one record.

Judge’s $40 million per season will be the highest ever for a position player in baseball. However, pitchers have recently begun to run away with the distinction for highest average annual value in the sport. Earlier this offseason, Justin Verlander signed a two-year, $86.6 million deal with the Mets, which is tied with now-Mets teammate Max Scherzer ($43.3 million).

Ronaldo’s upcoming deal with Al Nassr would set the record for highest average annual value by a comfortable margin, with his deal set to pay him $210 million per year.

MORE: Jon Heyman sets off ‘Arson Judge’ firestorm with premature Judge to Giants report

But before that deal is done, here’s a look at the highest paid athletes in sports history.

The NBA has the largest group of athletes ranked by average annual value, but MLB players aren’t too far behind, particularly with some of the recent contracts signed by pitchers.

And while Judge doesn’t quite top the list, he does come close behind two other New York players.

Sporting News’ Jacob Camenker also contributed to this report.