Star outfielder Mookie Betts and the Los Angeles Dodgers have agreed on a 12-year, $365 million extension that keeps the former American League MVP from reaching free agency this winter.

Combined with the one-year, $27 million contract he’s currently playing out, Betts’ total comes to 13 years and $392 million. The deal tops the previous extension record of $360 million signed by Mike Trout and includes a record $65 million signing bonus.

The Dodgers acquired the 27-year-old Betts from the Boston Red Sox in a blockbuster trade over the winter, giving up outfielder Alex Verdugo and shortstop prospect Jeter Downs with a guarantee of only one year — and the hope that Betts would consider re-signing before hitting the open market.

Betts is considered one of the best all-around players in baseball: an elite leadoff hitter with power, speed and four Gold Gloves in right field. He capped his championship-winning 2018 season with an MVP award and followed that last season by hitting .295/.391/.524.

According to ESPN Stats & Information research, Betts has posted four straight seasons with at least 100 runs, 40 doubles and 20 home runs, which ties him with Robinson Cano and Albert Pujols for the longest such streak in the expansion era, which began in 1961.

Betts is also an elite defender, having won the AL Gold Glove for right field each of the past four seasons, and he ranks second in baseball since 2016 with 93 defensive runs saved.

The Dodgers, with a strong young core and payroll flexibility, were the ideal destination for Betts. The team has no financial commitments beyond the 2022 season, though reigning National League MVP Cody Bellinger is due to hit free agency after 2023 and frontline starter Walker Buehler following the 2024 season.