Bryan Reynolds hit a tiebreaking two-run homer in the seventh inning and the Pittsburgh Pirates ended a season-high nine-game skid, beating the St. Louis Cardinals 6-4 on Wednesday night.
Pittsburgh bounced back from nearly being no-hit by St. Louis' Miles Mikolas in the second game of a doubleheader a night earlier.
Reynolds, who also tripled and scored, hit his 11th homer of the season after Tucupita Marcano singled with two outs off reliever Andre Pallante (2-1).
Reynolds had six multi-hit games during the Pirates' eight-game trip, batting .536 (15 for 28) in that span.
Wil Crowe (3-3) threw two scoreless innings in relief, and David Bednar picked up his 11th save by pitching the final 2 2/3 innings.
Jack Flaherty made his first appearance of the season for the Cardinals, who lost for the second time in their past nine home games. The 26-year-old right-hander started and threw 60 pitches, his limit, over three innings, allowing four runs, two earned, and three hits.
Flaherty had been sidelined with a shoulder injury. His last start was on Sept. 24 against the Cubs in Chicago. His last appearance came in relief on Oct. 3, and he was excited to be back on the mound.
Pittsburgh scored twice against Flaherty in the first inning. Reynolds tripled and scored on a groundout, and Cal Mitchell's RBI single made it 2-0.
The Pirates added two unearned runs in the second. Flaherty threw wildly to first on a sacrifice bunt by Tyler Heineman that scored Canaan Smith-Njgba. Hoy Park bunted for a hit but catcher Yadier Molina's errant throw to first allowed Heineman to score.
Dylan Carlson put St. Louis on the board with a second-inning homer.
The Cardinals tied it 4-4 in the fifth on Brendan Donovan's two-run double and Tyler O'Neill's fielder's-choice grounder. Donovan finished with three hits and was hit by a pitch.
Rookie Pirates starter Roansy Contreras allowed four runs, three earned, on six hits in 4 1/3 innings.
The Cardinals are at Boston on Friday, with veteran RHP Adam Wainwright (5-4, 2.84) making his second career regular season start against the Red Sox and first at Fenway Park. He started twice against Boston during the 2013 World Series.