"You think you've always got a chance," manager Cecil Cooper said. "I noticed that he had quite a few blown saves, but you've got to feel like you can always do something in a game. You're not going to give up.
"Kaz had a real good at bat and that was the key to make him throw strikes. He got put in a good situation and he put a good swing on it."
It was the Phillies closer's 10th blown save of the season and it came at the site of many nightmares for Lidge, who blew eight blown saves in 2007 with the Astros.
With one out in the ninth, Geoff Blum walked and Chris Coste singled before Jason Michaels walked to load the bases. After Michael Bourn grounded out into a force at the plate, Brad Lidge (0-7) almost seemed as if he might escape.
"The control just wasn't there," Lidge said. "I fell behind on the count to a few guys because of it. And obviously when you're falling behind 2-0, 3-0 and 3-1, you're getting into good hitter's counts."
Jose Valverde (3-2) pitched a perfect ninth after Philadelphia rallied from three runs down to lead 4-3 in the eighth.
Pedro Feliz singled for the Phillies to drive in the go-ahead run in a two-run eighth that followed two runs in the seventh.
The NL East leaders had scored only three runs in their previous four games and had been shut out twice in that span. They seemed ready to pick up a much-needed win until Lidge struggled again.
"Command issues," manager Charlie Manuel said. "He had trouble getting the ball over the plate and that's command issues. He got behind with the bases loaded and he had to try to throw something over the plate.
"Making him hit the ball is better than a walk, but at the same time, if he gets a hit, then the game's over. That's what happened."
The Phillies, who were without Chase Utley due to his sore right foot, had reached 17 scoreless innings before getting on the scoreboard. They trailed 3-0 before Astros starter Roy Oswalt left injured with one out in the seventh Saturday.
Oswalt allowed two runs on four hits before leaving due to tightness in his lower back with one out in the seventh. Before that, he struck out eight with one walk.
Philadelphia starter Joe Blanton allowed three runs on six hits and a walk. He struck out five.
In the second inning, Hunter Pence hit a two-run homer for his 22nd of the season, and added an RBI single up the middle in the third.
- Utley hurt his foot when he fouled a ball off it in his first at bat Friday night. Club officials say he was being held out as a precautionary measure and is day to day. Miguel Cairo started in his place.
- Astros 3B Jeff Keppinger sat out the game with a sore right hip after receiving treatment on it before the game. He is day to day.
- Bourn got his NL-leading 50th stolen base in the first inning. He's the first Astros player to reach 50 stolen bases since Craig Biggio in 1998.