PHILADELPHIA — The slumping Phillies finally produced some offense Thursday night, just not when they needed it most.
Ryan Howard went 3-for-4, and Freddy Galvis and Chase Utley each had a pair of hits and an RBI for Philadelphia. But the Phillies couldn't convert with runners on first and third and nobody out in the ninth inning of a 4-3 loss to the St. Louis Cardinals.
"We had some good chances. We just couldn't cash in on them," manager Charlie Manuel said. "We didn't get the big hit when we got chances. That's the best we've hit in a while."
The Phillies had 13 hits but failed to draw a walk for the fourth consecutive game. Philadelphia, which entered 26th in the majors with 34 walks, is averaging 2.1 per game.
"We had baserunners all night," Manuel said.
Carlos Beltran hit a go-ahead homer to the opposite field in the eighth inning and saved a run with a tough catch in the seventh for the Cardinals.
"He had a great night for us," Cardinals manager Mike Matheny said. "It's not easy to hit the ball out the other way, but we've had no bigger hit this season."
Adam Wainwright pitched seven solid innings for St. Louis and fill-in closer Edward Mujica escaped the ninth-inning jam. Yadier Molina went 3-for-4 with two RBIs for the Cardinals, who had seven hits one night after getting held to Beltran's seventh-inning double in a 5-0 loss to A.J. Burnett and the Pittsburgh Pirates.
Wainwright (3-1) wasn't quite as sharp as his previous start, when he tossed a four-hitter and matched a career high with 12 strikeouts Saturday in an 8-0 win over Milwaukee. The right-hander gave up three runs and nine hits this time while striking out four and walking none.
"With a lineup like that and a hitter's park, the main purpose was to keep the ball down. For the most part I was able to," Wainwright said.
He hasn't walked a batter in 29 innings to start the season.
"It's a recipe for success," Matheny said.
Beltran broke a 3-all tie with one out in the eighth when he homered to left field off Mike Adams (0-1).
"He's a really good hitter," Adams said. "I stayed away. I made the mistake of staying out there too long and left one up just enough where he could make a pretty good pass at it."
It was Beltran's 12th career homer at hitter-friendly Citizens Bank Park.
"It's a good ballpark to hit in," Beltran said. "Anything can happen if you hit the ball good. I hit it pretty good, but I never thought it was going to leave the ballpark."
Besides the homer, Beltran also prevented a run in the previous inning with an excellent catch of Jimmy Rollins' two-out drive to deep right. A retreating Beltran lunged at the last second to snare a ball that was headed for the wall and surely would have scored Domonic Brown from first base with the go-ahead run.
"He made a great play," Wainwright said. "It looked like his arm extended longer than it normally is."
Mujica wriggled out of trouble in the ninth to convert his first save opportunity. Matheny chose Mujica over Mitchell Boggs, who has blown two of his four save chances this season. It appeared Mujica was about to flop, too, but he recovered quickly.
Ben Revere led off the ninth with a single and went to third on Erik Kratz's single to right. Kratz moved up on pinch-hitter Kevin Frandsen's groundout to shortstop, but Revere held at third. Rollins struck out and Galvis grounded out to end it.
"He stepped up when we needed somebody," Matheny said of Mujica. "He came in and made pitches."
Phillies ace Cole Hamels, who had a 10.97 ERA through two starts, had a second consecutive strong outing but remained winless through four starts. He allowed three runs and five hits while striking out eight and walking two in seven innings.
"I felt really good. Everything was working really well," Hamels said. "But mistakes are coming at the wrong time right now. I have to be better than good. In order to win ballgames, you have to be great. I go out there expecting perfection."
The Cardinals opened the scoring with a pair of runs in the fourth. Hamels walked Matt Holliday leading off and Allen Craig followed with a line drive to right field that fell in front of John Mayberry Jr., who slipped while pursuing the ball.
Molina drove home both runners with a double down the right-field line. Manuel came out to argue that the ball was foul.
"It looked like the umpire might have missed it," Manuel said. "It was very, very close."
Philadelphia tied it in the sixth on three straight hard-hit balls off Wainwright. With one out, Rollins lined a double just inside first base and scored on Galvis' double off the center-field wall that was just out of Jon Jay's reach. Utley added an RBI single.
St. Louis regained the lead in the seventh on Pete Kozma's sacrifice fly after David Freese opened the inning with a double.
In the bottom half, Kratz ended an 0-for-16 slump with an RBI single.
Galvis played the outfield for the first time in his career. He started in left in place of Brown, who left Wednesday's game against the Reds with a back injury. Brown pinch-hit in the seventh and reached on a fielder's choice.
Manuel, hoping to get his struggling offense going, moved Revere out of the leadoff spot for the first time this season in favor of Rollins, who led off during most of his previous 13 seasons with Philadelphia. Revere, batting seventh, was 1-for-3 while Rollins was 1-for-5.
Notes: The Phillies haven't walked in their last 135 plate appearances. ... Phillies RHP Roy Halladay (1-2, 7.63 ERA) faces LHP Jaime Garcia (1-0, 1.86) in the second game of the four-game series tonight. ... Philadelphia placed LHP John Lannan on the 15-day DL with a strained quadriceps tendon in his left knee and recalled LHP Joe Savery from triple-A Lehigh Valley. Savery was 1-0 in 7 2-3 scoreless innings with 11 strikeouts and no walks.