Bryce Harper and the Philadelphia Phillies have agreed to a 13-year contract worth $330m, making it the richest deal in baseball history.

Harper, a 26-year-old All-Star outfielder who’s spent the entirety of his seven-year major-league career with the Washington Nationals, topped the 13-year, $325m agreement outfielder Giancarlo Stanton reached before the 2015 season with the Miami Marlins.

The MLB Network was first to report the news of the impending deal, which is subject to a successful physical.

Why is Cleveland Indians' Trevor Bauer MLB's most hated man? Read more

Harper will collect a $20m signing bonus, a $10m salary this year, $26m in each of the following nine seasons and $22m in each of the last three years. None of the money is deferred.

“The goal was to get the longest contract possible,” his agent, Scott Boras told the New York Post. “Bryce wanted one city for the rest of his career. That is what I was instructed to do. It is very difficult in this time to get length of contract that takes a player to age 37, 38, 39.”

A teenage prodigy dubbed the “LeBron James of baseball” by Sports Illustrated when he graced the magazine’s cover as a high-schooler in 2009, Harper was chosen by the Nationals with the first overall pick in the 2010 MLB first-year player draft.

He was named NL Rookie of the Year in 2012 and earned the league’s Most Valuable Player award in 2015, amassing a .279 average with 184 homers, 521 RBIs and a .388 on-base percentage over his major-league career.