The Cardinals added a big-time bat to their lineup for 2019 by acquiring first baseman Paul Goldschmidt from the Diamondbacks, the teams announced Wednesday. St. Louis will send right-handed pitcher Luke Weaver, catcher Carson Kelly, infielder Andy Young and a 2019 Competitive Balance Round B draft pick to Arizona in the deal.

Goldschmidt, a National League All-Star in each of the last six seasons, entered the offseason as one of the biggest trade candidates on the market. He’s set to make $14.5 million next season before hitting free agency in 2020, when he’ll be in line for another lucrative deal stretching into his 30s.

Rather than risk letting Goldschmidt walk for nothing in return, the Diamondbacks pulled the trigger on a deal a year early to replenish their roster.

Weaver, 25, is a former first-round pick who split the past three seasons between the Cardinals and the minor leagues. He recorded a 4.95 ERA in 136.1 innings over 30 appearances (including 25 starts) with St. Louis in 2018, but had been better the year before with a 3.88 ERA in 60.1 innings.

The other two could also provide depth to the Diamondbacks’ lineup. Kelly, 24, has limited big-league experience with a .154/.227/.188 batting line in 131 plate appearances since 2016. Young, also 24, started 2018 in the Class A level, but raked the Class AA level with a .319/.395/.556 batting line in 152 plate appearances after a promotion.