The Los Angeles Dodgers and star outfielder Mookie Betts have agreed to a 12-year extension, the MLB franchise announced on Wednesday.

Betts – the 2018 American League MVP – will remain with the Dodgers through the 2032 season in a deal reportedly worth $365million.

It would be the second largest contract in MLB history in terms of guaranteed money. The Los Angeles Angels signed three-time AL MVP Mike Trout to a 12-year, $426.5m extension prior to the start of last season.  

Betts – acquired by the Dodgers from the Boston Red Sox in February as the centerpiece of a blockbuster trade that also sent pitcher David Price to Los Angeles – was set to enter free agency at the conclusion of the upcoming season.

The 27-year-old agreed to a $27m salary for 2020 in his final year as an arbitration-eligible player. 

Betts' deal ensures the Dodgers will have one of baseball's premier players on their roster for virtually the entire prime of his career. A career .301 hitter with a .374 on-base percentage, his 487 runs scored since 2016 are the most by any player over a four-year span since 2004-07 (Jimmy Rollins, 500; Alex Rodriguez, 492), and he has averaged 29 home runs, 94 RBIs and nearly 25 stolen bases per season during that period. 

Betts also brings elite defense to the table, having earned four consecutive Gold Gloves and twice winning the Wilson Defensive Player of the Year award as a right fielder (2016, 2018). 

The four-time All-Star put together his best season in 2018, when he led the majors with a .346 batting average and produced 32 homers, 80 RBIs, 30 stolen bases and 129 runs scored as the catalyst for a Red Sox team that defeated the Dodgers in five games in the World Series.

Betts became the first player in AL history to win an MVP award, a Silver Slugger, a Gold Glove and a World Series in the same season. 

Boston's win total slipped from 108 that season to 84 in 2019, however. With a rebuild looming and the uncertainty of Betts' impending free agency and the luxury tax implications that would come with re-signing him, the Red Sox made the decision to trade him for 24-year-old outfielder and two well-regarded prospects in shortstop Jeter Downs and catcher Connor Wong. 

The Dodgers made the deal in hopes they have found the final missing piece to a franchise that have seven consecutive playoff appearances but have fallen short in their quest for a first World Series title since 1988.

The Dodgers were ousted by the Houston Astros in seven games in the 2017 Fall Classic and lost to Betts' Red Sox the following year, then fell to eventual World Series champions the Washington Nationals in five games in last year's NL playoffs.