ST. LOUIS -- As Tommy Pham chased Freddy Galvis' potential game-tying hit with two outs and a runner at third in the top of the ninth inning Friday night, the St. Louis Cardinals left fielder thought about one thing.
"I have to make this catch because I don't want to go into extra innings," he said. "We have an early game tomorrow. I don't want us to stay late and come here early."
Pham's diving snag of Galvis' liner capped one of the more tumultuous days in recent franchise history and ended a seven-game losing streak, giving St. Louis a 3-2 decision over the Philadelphia Phillies at Busch Stadium.
Hours after executing six personnel changes on the playing roster and coaching staff, the Cardinals (27-32) won for only the sixth time in 23 games.
They did so with the one formula that usually ensures success no matter who's on a roster - pitching. Michael Wacha (3-3) won for the first time in seven starts with six solid innings and three relievers each worked a scoreless inning.
None of that would have mattered had Pham not used his speed, as well as help from newly promoted third base coach Mike Shildt. Just before Galvis poked a 1-2 pitch from closer Seung Hwan Oh down the left field line, Shildt, who is also in charge of positioning outfielders, moved Pham closer to the line.
Moments later, Pham made the game-saving play and music played in the St. Louis clubhouse for the first time since June 1, when it last won a game.
"It feels good to have the music blaring in here after a win," Wacha said. "It's been a while."
Wacha did his part to start the postgame concert. After allowing two two-out runs in the third on Tommy Joseph's RBI single and Aaron Altherr's triple off the right field wall, Wacha cruised through the last three innings, allowing just one hit and mowing down seven of the last eight men.
He gave up five hits and two runs in his longest outing since May 19, walking two and fanning two.
"I felt like I had pretty good command of mostly everything," Wacha said. "The one inning, I got in trouble with a couple of two-out hits. Overall, my stuff felt really good."
The Cardinals got those runs back in their half of the third off Jeremy Hellickson. Stephen Piscotty's sacrifice fly to the wall in center scored Matt Carpenter and Jedd Gyorko's RBI single up the middle plated Dexter Fowler to tie it.
In the fifth, Aledmys Diaz homered for the first time since May 1, belting a bad 1-2 offering over the wall in left-center field. It was his sixth homer of the year and provided the difference.
Hellickson (5-4) allowed 10 hits and three runs in six innings, walking one and whiffing five.
"Hellickson dodged bullets all night," Philadelphia manager Pete Mackanin said. "He gave up a lot of hits but beared down when he had to. He pitched well enough to win and he pitched well enough to lose. We just couldn't score."
Given that the St. Louis bullpen had coughed up 11 runs in its previous 8 1/3 innings, Hellickson might have expected to get a win upon his departure.
Instead, Matt Bowman struck out the side in the seventh. Trevor Rosenthal pitched around a leadoff hit in the eighth. Oh tightroped through the ninth, overcoming Altherr's bloop double and stranding him at third.
It was Oh's 14th save in 16 chances. But if saves were given to fielders for defensive plays, Pham would have definitely logged one.
"We have an early game tomorrow. I don't want us to stay late and come here early," Pham said.
NOTES: St. Louis activated 2B Kolten Wong (elbow) from the 10-day DL and designated INF Jhonny Peralta for assignment. In the final year of a four-season, $52 million deal, Peralta was batting only .204 with no RBI in 58 plate appearances. ... The Cardinals also reassigned third base coach Chris Maloney within the organization, moved quality control coach Mike Shildt to Maloney's old post and added longtime minor league manager/coach Ron Warner to the coaching staff. ... St. Louis also announced assistant hitting coach Bill Mueller is taking a leave of absence. It promoted Memphis hitting coach Mark Budaska to fill the same role. ... Philadelphia CF Odubel Herrera saw his streak of collecting an extra-base hit in six consecutive games end Friday night.