Jeremy Hellickson gave the Philadelphia bullpen a much-needed rest.
Cesar Hernandez homered, doubled and singled, and Hellickson pitched seven strong innings in the Phillies' 4-2 victory over the St. Louis Cardinals on Saturday night.
Hellickson became the first Philadelphia starter to throw seven innings since July 26.
"That was just what the doctor ordered," Phillies manager Pete Mackanin said.
Maikel Franco had two hits, including a double and the winning RBI, and Aaron Altherr homered for the Phillies. They have hit home runs in 14 straight games.
"Great night for us," Mackanin said.
Jeremy Hazelbaker homered and Jhonny Peralta had three hits for St. Louis, which had won five in a row. The Cardinals are 1 1/2 games ahead of Miami for the second wild-card spot in the National League.
"We had a hard time getting anything going against their starter," Cardinals manager Mike Matheny said. "We couldn't get a lot of those late hits we've been accustomed to getting."
St. Louis fell short of setting a major league record of 10 straight games with multiple home runs. The Cardinals tied the mark with a pair of homers Friday night.
Hellickson (10-7) skipped his last start because of back tightness. The right-hander looked healthy and sharp, allowing two runs on seven hits with eight strikeouts and one walk. He pumped his fist into his glove after striking out pinch-hitter Greg Garcia to finish the seventh.
"I felt good," Hellickson said. "It was good to save the bullpen tonight. I was just getting ahead and kept the fastball down for the most part."
Franco put the Phillies ahead for good with a two-out single to left in the fifth that scored Hernandez from third.
Jeanmar Gomez pitched a scoreless ninth for his 33rd save in 37 opportunities.
The Phillies jumped on rookie Luke Weaver (0-1) with a pair of runs in the first.
Hernandez led off by driving an 0-1 pitch into the seats in right field for his fourth homer of the season. The Phillies have gotten Hernandez to level his swing midseason, and he is batting .350 since June 27. He is hitting .500 with a pair of homers in seven games during Philadelphia's homestand.
"He's really swinging the bat well," Mackanin said. "We had a harsh reality check for him -- keep the ball out of the air."
Cameron Rupp put Philadelphia in front 2-0 with a broken-bat RBI single to left.
The Cardinals tied it in the third. Weaver singled to center for his first career hit and scored on Hazelbaker's two-run homer to left.
After the Phillies took the lead in the fifth, Altherr made it a 4-2 game by drilling an 0-1 pitch from Jonathan Broxton over the wall in left.
Altherr's homer was the first the Phillies have hit off Broxton since Matt Stairs' pinch-hit homer in Game 4 of the 2008 NLCS at Los Angeles.
Weaver, a 22-year-old making his second career start, went five innings and allowed three runs on nine hits with six strikeouts and no walks.
"I might be trying to make too good of pitches, which pushes the pitch count up," said Weaver, who was lifted after 96 pitches. "It's not about making the perfect pitch, just making a quality one."
The Phillies won for just the third time in their last 12 games against St. Louis.
A young fan sitting about 20 rows behind the Cardinals dugout was struck by a foul ball off the bat of Freddy Galvis in the eighth inning. After being treated at the seat for several minutes, the fan was carried out to the concourse by an adult into the waiting arms of medical personnel.
Phillies: Hernandez was back in the starting lineup after a two-game absence due to a sore right foot. He did pinch-hit in Friday night's game.
The teams conclude their three-game series Sunday when Cardinals RHP Mike Leake (8-9, 4.78) faces RHP Vince Velasquez (8-5, 4.14).