All-Star first baseman Paul Goldschmidt and the St. Louis Cardinals are finalizing a five-year extension for $130 million, a source familiar with the deal confirmed to ESPN's Jeff Passan on Thursday.

The deal will keep Goldschmidt, who will make $15.5 million this season in the final year of his current deal, with the Cardinals through the 2024 season.

Goldschmidt, who has finished second or third in NL MVP voting three times, was in line to be a free agent next winter.

The deal was first reported by The Athletic.

The Cardinals acquired the 31-year-old slugger in a trade with the Arizona Diamondbacks on Dec. 8 in exchange for right-handed pitcher Luke Weaver, catcher Carson Kelly and infielder Andy Young.

According to ESPN Stats & Information, the extension would make Goldschmidt the highest-paid player in Cardinals history, surpassing the seven-year, $120 million deal given to Matt Holliday in 2010. It would also rank him ahead of Yadier Molina, who will make $20 million this season.

Goldschmidt, an All-Star each of the past six seasons, had a .290 batting average with 33 home runs, 83 RBIs, 35 doubles and 90 walks last season. His .922 OPS ranked third in the National League and his .934 OPS since 2012 is second highest in the NL behind Cincinnati's Joey Votto during that span.

Goldschmidt, who won four Silver Slugger Awards and three Gold Gloves in his eight seasons with the Diamondbacks, has had four seasons with at least 33 home runs and has 209 overall. He also has a .297 career batting average with 710 RBIs.