PHILADELPHIA -- Hunter Pence let the lead slip away with one big bobble out in right.
He atoned for his error an inning later with one big homer to left.
Pence connected off former Philadelphia closer Brett Myers (0-1) with one out to give the Phillies their first three-game winning streak of the season. He was mobbed at the plate in celebration by his easily forgiving teammates while his fielding gaffe was filed to the blooper reel.
Pence's error in right field while trying to make a throw home allowed Houston to tie it with two outs in the ninth.
"I felt horrible that it happened," Pence said. "The team really picked me up."
The NL East champions ended a dubious drought with Pence's ninth homer of the season. This was the longest stretch of games (37) into a season without a three-game win streak for the Phillies since 1971, when they needed 51 games.
"I've never had a hitter like Hunter," manager Charlie Manuel said, "but he's a good one."
Lee allowed one run and struck out 10 over eight strong innings. Jake Diekman tossed 1 1/3 scoreless innings to win his major league debut.
Phillies closer Jonathan Papelbon was shut down for a day after pitching in back-to-back games. That opened the door for a Houston rally against a scuffling bullpen.
Carlos Lee hit an RBI single off Qualls to cut it to 3-2.
Pinch runner Brian Bogusevic kept the rally going when he stole second. J.D Martinez hit a liner to right and got the hold sign at third. Pence let the ball slip out of his hand as he was preparing to throw and Bogusevic sprinted home for the tying run.
"I was charging it hard and I really can't tell you how it came out of my hand," Pence said. "I was trying to fire it as hard as I could."
Jason Castro then doubled to chase Qualls and put runners on second and third.
Qualls was booed off the mound for the blown save and wasting Lee's fantastic effort.
Diekman struck out Marwin Gonzalez to end the inning and was rewarded with the victory.
Brian Schneider also homered for the Phillies, who won for the fourth time in five games and swept the two-game series.
Astros manager Brad Mills gambled bringing in Myers for the 10th in a tie game.
"Coming into a tie ballgame on the road, I was prepared but, it just baffled me a little bit," Myers said. "I can just go out there and do my job. That's all I can do when called upon."
Mills said Myers was warmed up and wanted to pitch.
It was hard to believe the game came down to a closer the way Lee pitched.
Lee walked only one and allowed one run in his second start since straining his left oblique. The Phillies had lost all four of Lee's starts, including two one-run defeats. Lee was clearly a tough-luck loser. He entered with a 1.68 ERA since June 1 of last season.
Schneider's two-run shot in the second and Pence's solo homer in the sixth were nearly enough to get Lee back in the win column.
The lefty was never in any serious trouble and showed no signs of being slowed down by the injury that put him on the 15-day disabled list. Lee threw 10 scoreless innings on April 18 in a 1-0 loss to the Giants in 11 innings, but landed on the DL a few days later.
Matt Downs hit a solo homer off Lee in the seventh.
Citizens Bank Park was pounded all morning by rain and the tarp was on the field until just before the first pitch. The stadium was maybe half full for Lee's first pitch and there were thousands of empty seats scattered across the park all game. Still, the Phillies announced a crowd of 43,781 for their 222nd straight sellout.
Houston's Jordan Lyles, recalled from Triple-A Oklahoma City, was betrayed by his defense in the second inning. After a runner reached on a throwing error, Schneider pulled his first homer of the season into the right field seats for a 2-0 lead.
Manuel was ejected by plate umpire Bob Davidson in the eighth. Manuel and Davidson argued nose to nose and exchanged profanities to the delight of the crowd chanting "Charlie! Charlie!" Manuel thought a ball had been foul tipped.
"I don't even want to talk about that," Manuel said.
Tennis great Billie Jean King threw out the first pitch. ... Lee collided with umpire Hunter Wendelstedt in the first while trying to make a play on a base hit. Both were briefly down. ... Lyles made the start for Kyle Weiland, who had arthroscopic surgery for an infection in his right shoulder. The Astros optioned RHP David Carpenter to Oklahoma City to make room for Lyles.