Lane Thomas ripped a go-ahead grand slam in the seventh inning, Paul Goldschmidt and Dexter Fowler also homered, and St. Louis beat the Pittsburgh Pirates 11-9 Sunday.
The Cardinals rallied from an 8-4 deficit to sweep the three-game series and move into second place in the NL Central, two games behind the Chicago Cubs.
Josh Bell had two homers and four RBIs for Pittsburgh, which has lost eight straight. Pablo Reyes added a solo shot in the ninth.
Thomas, playing his 21st game, drove in five runs. His first career slam came off Kyle Crick (3-7) and put the Cardinals ahead 9-8. He also had an RBI triple in the fourth.
Thomas' five RBI performance ties him for second among NL rookies this season behind Will Smith of the Los Angeles Dodgers, who drove in six against Washington on July 17.
John Gant (8-0) tossed a scoreless seventh to pick up the win. Andrew Miller recorded up his fourth save in six tries.
Goldschmidt hit his team-high 26th homer in the first inning and started the five-run seventh-inning rally with a leadoff single. Marcell Ozuna followed with a single, and Crick hit back-to-back batters to set the stage for Thomas' third homer of the season.
Fowler hit a two-run homer in the eighth off Geoff Hartlieb.
Bell hit two-run homers in the first and fifth innings. It was the fifth multihomer game of his career, all this season. The homers, his 28th and 29th, were his first since July 5. He has an NL-leading 68 extra-base hits.
Pittsburgh starter Steven Brault gave up four earned runs on five hits over 4 2/3 innings. He struck out three and walked three. Brault had a seven-game hitting streak halted with an 0-for-2 performance. He came into the contest on an 8-for-10 run.
Cardinals starter Miles Mikolas surrendered five earned runs and seven hits over five innings. He gave up both home runs to Bell.
St. Louis outfielder Jose Martinez left the game in the fifth with right shoulder discomfort. He will undergo tests on Monday and is considered day-to-day.
Jack Flaherty (5-6 3.72) will take on Kansas City RHP Glenn Sparkman (3-7, 5.71) in the first of a two-game series on Tuesday in Kansas City. Flaherty struck out 10 batters in seven innings of a 2-1 loss to the Dodgers on Wednesday.