PHILADELPHIA -- Chase Utley needed just one swing to turn a rough night into an ideal ending.
Ryan Howard homered and drove in three runs for the Phillies, who snapped a two-game losing streak.
Aaron Fultz (2-0) pitched two scoreless innings for the win.
"This game had a lot of ups and downs. Fortunately for us, it ended on an up," Utley said.
After getting the first two outs, Quantrill surrendered a pinch-hit single to Jason Michaels. Utley, who was 0-for-5 and had one hit in his last 13 at-bats, drove a 2-2 fastball into the right-center field seats -- a 406-foot shot -- for his 13th homer.
"No hits going into the last at-bat, it was a rough night," said Utley, who also committed an error. "I got down in the count and choked up on the bat. I just wanted to put the ball in play."
It was the Phillies' third walk-off homer of the season and second on the homestand. Howard hit a two-run homer in a 5-4, 10-inning win over the Los Angeles Dodgers on Tuesday.
"I was trying to go down and away and just left it up," Quantrill said. "It's a situation where I don't want to go 3-2, but I got to make a better pitch there."
Phillies manager Charlie Manuel still couldn't believe what happened over the last two innings.
"Bases loaded and no outs and we don't score. Then, two outs, a pinch-single and a two-strike homer. I don't know what you call it, but it's good," he said.
San Diego's Ramon Hernandez hit a leadoff double off Ugueth Urbina in the eighth and Blum followed with a double to right. Hernandez was thrown out trying to score with two great relay throws by center fielder Endy Chavez and Utley.
Hernandez appeared he may have slid around the tag of catcher Mike Lieberthal, but plate umpire Bill Hohn called him out.
"(Hernandez) looked like he thought the ball was going to be caught and got too close to the bag," San Diego manager Bruce Bochy said. "They made a great relay, a really strong throw by Utley."
With the score tied at 3-3 in the sixth, David Bell hit an RBI double and pinch-hitter Chavez added a two-run single as the Phillies took a 6-3 lead.
San Diego answered right back against the Phillies' bullpen. Blum hit his fifth homer -- a solo shot off Rheal Cormier -- and Ryan Klesko tied it at 6-all with a two-out, two-run single off Ryan Madson.
"It's a tough loss," Bochy said. "We had two good comebacks. We swung the bats better. That's a good sign."
Philadelphia starter Vicente Padilla pitched six effective innings but his scoreless streak was stopped at 17 innings. He surrendered three runs and four hits, walking two and striking out a season-high six.
Philadelphia took a 2-0 lead off Tim Stauffer on Howard's sixth homer of the season, a two-run shot in the second inning. He added a RBI single two innings later.
San Diego pushed across three runs in the fifth to tie the game. Loretta hit a fly ball that landed in the flower box just over the left-field fence for his first homer of the season. Giles hit a much longer drive deep into the right field seats for his 10th homer.
- Padilla's prior longest shutout streak was 14 1/3 innings in 2003.
- Howard has six homers and 17 RBI in his last 20 games.
- Urbina had his 8 1/3 inning hitless streak snapped in the eighth. Batters were 0-for-26 before Hernandez's double. Urbina still owns a 9 1/3 innings scoreless streak.
- Philadelphia closer Billy Wagner committed a balk in the ninth inning -- the Phillies' eighth balk, tying Houston for the NL high.