ST. LOUIS (AP) — Josh Palacios hit a pinch hit home run off Drew VerHagen in the top of the ninth inning to help the Pittsburgh Pirates beat the St. Louis Cardinals 7-6 for their fifth straight win.

VerHagen (4-1) entered the game with one out in the ninth inning and hit Andrew McCutchen before Palacios, pinch hitting for Connor Joe, hit a 3-1 pitch into the right field seats for his seventh home run of the season.

Jordan Walker, Lars Nootbaar and Tyler O’Neill all homered for the Cardinals.

Bailey Falter entered the game in the third inning and allowed one run on one hit and a walk in 3 2/3 innings as the Pirates’s bulk reliever after opener Thomas Hatch allowed three runs on three hits in 2 1/3 innings.

Cody Bolton (1-0) pitched a perfect eighth inning for his first major league win, and David Bednar surrendered a single to Tommy Edman and hit Walker with a pitch before retiring Masyn Winn, Nootbaar and Paul Goldschmidt for his 31st save.

Drew Rom allowed three runs on five hits and walked three batters in 4 2/3 innings in his third career start and first at home.

After Edman singled to lead off the seventh inning, Walker hit a 1-0 pitch over the center field wall for his 13th home run of the season to push St. Louis ahead 6-5.

Miguel Andujar drove in Endy Rodríguez with a double to center field off Jacob Barnes for his first hit with the Pirates and scored two batters later on a Ji Hwan Bae single to give Pittsburgh a 5-4 lead in the sixth inning.

Nootbaar hit his 13th home run of the season to right-center field in the bottom of the fifth after O’Neill hit a three-run shot for his eight of the season in the second inning.

Joe delivered an RBI triple in the fourth inning, and Bryan Reynolds and McCutchen added back-to-back RBI singles in the fifth to tie the game at 3.

TRAINER’S ROOM

Pirates: OF Henry Davis (right hand muscle strain) took batting practice pregame after having recently been cleared to resume taking swings.

Cardinals: RHP Adam Wainwright (general fatigue) will have his scheduled start Sunday pushed back to Thursday in Atlanta. … RHP Guillermo Zuñiga (right forearm strain) was transferred to the 60-day injured list to clear a 40-man roster spot after the club claimed OF Michael Siani from Cincinnati off waivers and optioned him to Triple-A Memphis.

UP NEXT

Pirates RHP Johan Oviedo (8-13, 4.20 ERA) tossed a two-hitter for his first career shutout in his last outing at Kansas City on Monday night. He will face Cardinals LHP Zack Thompson (3-5, 3.92 ERA) on Sunday.