Updated

HOUSTON (AP) — Roy Oswalt moved into second place on the Astros' all-time strikeouts list in leading Houston to a 4-3 win over the Pittsburgh Pirates on Friday night.

Carlos Lee had a two-run double and Jeff Keppinger and Pedro Feliz drove in runs for the Astros, who've won six of eight after an 0-8 start.

Oswalt (2-2) allowed four hits, struck out four and didn't give up a run until his last inning, the seventh. Brandon Lyon pitched a perfect eighth and Matt Lindstrom shut out Pittsburgh in the ninth to earn his fifth save in as many chances this season.

Garrett Jones and Jeff Clement homered for the Pirates, who were coming off a franchise-worst 20-0 loss to Milwaukee on Thursday. Left-hander Paul Maholm (1-2) gave up four runs on six hits in seven innings, losing for the first time in his last five starts at Minute Maid Park.

Maholm didn't allow a hit until Oswalt's one-out single in the third inning. One out later, Keppinger ripped a grounder that went through third baseman Delwyn Young's legs for a double and a 1-0 lead.

Oswalt retired nine in a row after Jones' leadoff single in the second. Ryan Doumit led off the fifth with a single, but Oswalt set down the next three hitters, striking out Maholm to end the inning.

Oswalt needed only 11 pitches to breeze through the sixth. Since 2001, Oswalt has pitched at least six innings in 26 consecutive starts against Pittsburgh, the longest active streak in the majors, according to the Elias Sports Bureau. Oswalt also has 26 straight starts of six innings or more against St. Louis.

The Astros stretched the lead to 4-0 in the sixth, after Michael Bourn led off with an infield hit. Keppinger bunted, Young charged in and threw wildly to first base, putting runners on second and third.

One out later, Lee blooped a double down the left-field line. Lee came in with only eight hits and one RBI in 59 at-bats.

Feliz drove in Lee with a ground-rule double that bounced sideways into the seats down the right-field line.

Oswalt misplayed Ryan Church's bunt leading off the seventh, his first error in 121 starts since May 2006. Jones followed with a two-run homer into the Astros' bullpen, ending Pittsburgh' 25-inning scoreless streak.

Clement hit a solo homer to the left-field boxes to cut Houston's lead to 4-3. Oswalt then struck out Young and moved past J.R. Richard on the Astros' all-time list (1,494). Nolan Ryan is the franchise's career strikeouts leader (1,866).

Oswalt escaped more trouble when Bourn made a leaping catch on the warning track to rob Ronny Cedeno of extra bases. Bourn made a diving catch on Jones' liner to center leading off the ninth.