PHOENIX (AP) The St. Louis Cardinals struck gold in their search for a big hitter, acquiring slugging first baseman Paul Goldschmidt in a blockbuster trade with the Arizona Diamondbacks on Wednesday.

Eager to push for the playoffs after a three-year absence, St. Louis sent pitcher Luke Weaver, catcher Carson Kelly, minor league infielder Andy Young and a 2019 draft pick to Arizona.

A six-time All-Star and three-time Gold Glove winner at 31, Goldschmidt was among the top players available in the trade market. He hit .290 with 33 home runs and 83 RBIs last season.

"We've been busy this offseason working to upgrade our lineup, and today we are excited to announce the acquisition of one of the game's premier players," Cardinals President of Baseball Operations John Mozeliak said in a statement.

Goldschmidt has a $14.5 million salary next year, receives a $1 million assignment bonus for the trade and will be eligible for free agency after next season. The Cardinals have a history of acquiring top hitters and then signing them to long-term deals, including Mark McGwire and Matt Holliday.

St. Louis went 88-74 last season and felt it needed a boost in the middle of a lineup that includes Matt Carpenter, Marcell Ozuna and Yadier Molina to compete with the likes of Milwaukee and the Chicago Cubs in the NL Central. The Cardinals' postseason drought is their longest since 1997-99.

Free-agent slugger Bryce Harper has supposedly been on the Cards' wish list, too, with the winter meetings coming up this weekend. Last offseason, the Cardinals had worked out a deal with Miami for NL MVP Giancarlo Stanton, but he refused to waive his no-trade clause.

Arizona went 82-80 in the NL West and finished behind the Los Angeles Dodgers and Colorado, which both made the playoffs.

The Diamondbacks parted ways with a homegrown player who grew to be the face of the franchise but is nearing the end of an extremely team-friendly contract. The quiet slugger was selected by Arizona in the eighth round of the 2009 draft and made his major league debut in 2011.

In 2013, Goldschmidt hit 36 home runs and drove in 125. In 2017, he matched that home-run high with 36 and drove in 120. He is a .297 career hitter with 209 home runs, and was runner-up in the NL MVP voting in 2013 and 2015.

"Certainly this is a bittersweet decision on our part," Diamondbacks general manager Mike Hazen said on a conference call. "I don't think I could overestimate the impact that Paul had on our team."

Hazen said the key to the deal was what the Cardinals offered in return. If there was no trade, the Diamondbacks faced the prospect of Goldschmidt leaving as a free agent after next season.

"There are decisions you want to do and there are decisions you know you have to do," Hazen said.

He said he understood fans' disappointment.

"Paul is possibly the best player in the National League," Hazen said. "We understand that. We've understood that for a long time."

Despite an awful start to last season, he bounced back to once again become a powerful force. Goldschmidt was the Diamondbacks' franchise leader in slugging percentage and on-base percentage.

"This was an extremely difficult decision given how much Paul has meant to our team both on and off the field. He represents everything it means to be a D-back, and we are very thankful to him for all that he has done for our franchise and our fans," Diamondbacks President Derrick Hall said.

Weaver, a 25-year-old right-hander, was 7-11 with a 4.95 ERA last season. He was long rated among the top St. Louis prospects and Hazen expects him to immediately join the rotation.

The 24-year-old Kelly has played for the Cardinals in parts of the past three seasons, batting .154. He is highly regarded for his defensive ability.

Young, 24, hit a combined .289 in Double-A and high-A ball.

The draft choice that Arizona got will come after the second round, likely a pick somewhere in the high 70s or low 80s.

Free agency had already cost the Diamondbacks, who made the playoffs and beat Colorado in the NL Wild Card game a year ago before being swept by the Dodgers. They were priced out of any chance of re-signing left-hander Patrick Corbin.

Corbin signed a $140 million, six-year contract with the Washington Nationals. Center fielder A.J. Pollock remains on the free-agent market but it seems unlikely the Diamondbacks would re-sign him.

Hazen said it's premature to say Arizona is in a full-scale rebuilding mode, noting the team still has plenty of talented players.

But another Arizona question is whether it can trade ace right-hander Zack Greinke, a move that probably would require the Diamondbacks to eat a chunk of his formidable salary.

Hazen wouldn't offer a guess on whether Greinke would be on the team next season but said "We're exploring everything possible to make this organization stronger."