Three weeks in the minor leagues improved Randal Grichuk's swing.

Grichuk hit a go-ahead, three-run homer in the seventh inning and drove in five runs, leading the St. Louis Cardinals over the Arizona Diamondbacks 10-4 Thursday.

In his fourth big league season, Grichuk was sent down May 29 and recalled from Triple-A Memphis on Sunday after 15 games in the minors.

"I definitely took it as a wake-up call," he explained. "I said, let's go and make sure it doesn't happen again."

He homered in each of his first two games back, using a shorter swing, but was 0 for 9 entering Thursday.

Arizona led 3-2 with two outs in the seventh when pinch-hitter Luke Voit doubled off Ruby De La Rosa (0-1) and Matt Carpenter was intentionally walked.

You have an established major-league hitter has a tremendous track record," Diamondbacks manager Torey Lovullo said.

Grichuk sent a 1-2 slider into the left-field seats.

"It definitely shows there's not respect," Grichuk said of Arizona's strategy.

De La Rosa said he tried to throw a breaking ball in the dirt.

"I put too much effort," he said.

Tommy Pham hit a two-run single off Randall Delgado in the eighth. Grichuk followed with a two-run double, raising his average to .233 with seven homers and 28 RBIs. He scored on Stephen Piscotty's single.

Lance Lynn (6-5) allowed three runs and four hits in six innings, struck out seven and walked one.

Diamondbacks starter Patrick Corbin gave up two runs and five hits in six innings.

Gregor Blanco hit an RBI double in the third, but Jose Martinez had a two-run single in the fourth. Goldschmidt's 19th homer tied the score in the bottom half, and Jake Lamb hit an RBI grounder in the sixth after Blanco's triple.

Lamb homered in the ninth against Mike Mayers.

DEBUT TWO

Alex Mejia of the Cardinals was 0 for 2 in his major league debut, stranding four runners. He started at second base and can play any infield position, manager Mike Matheny said. Mejia helped lead the University of Arizona to the 2012 College World Series title.

"It's pretty nice to get it out of the way," Mejia said.

UP NEXT

Cardinals: Mike Leake (5-6) is to start Friday's homestand opener against Washington. Leake is 0-4 in his last six starts, but his 3.12 ERA is ninth in the NL among qualified pitchers.