Updated

Jeff Karstens allowed one run in seven-plus innings, Brandon Wood homered and the Pittsburgh Pirates won their third consecutive game, 5-1 over the Houston Astros on Tuesday night.

Pittsburgh (45-41) improved to four games over .500 this late in a season for the first time since 1992, the team's most recent winning season before a major North American professional sports record 18 straight losing seasons.

The Pirates did not win their 45th game last season until Sept. 3.

Clint Barmes went 2 for 4 with a homer for free-falling Houston, which has lost five straight and 10 of 11.

Karstens (7-4) allowed seven hits and struck out three, giving a Pittsburgh starter its 34th win this season. That matches how many the entire starting staff had in 2010.

Matt Diaz had three hits and Neil Walker and Lyle Overbay two hits and two runs each for the Pirates, who have won four of five and 10 of 14.

Wood entered Monday's series-opening Pirates victory in the fourth inning after Josh Harrison left the game following a collision at home plate. He likely would not have started Tuesday except that Harrison — although he passed concussion tests — was given an extra day of rest.

Wood, who has homered twice in his past four starts, was on base three times and had a run and three RBIs.

After Overbay singled to lead off the bottom of the second, Wood took the first pitch from Wandy Rodriguez into a sliver of seats in right-center for his fourth home run of the season.

Two innings later, Wood made it 3-0 with a two-out single that scored Walker, who had doubled.

The Pirates' final two runs came in the sixth, on a sacrifice fly by Michael McKenry and Karstens' perfect suicide squeeze bunt to the right side short of the mound while Overbay sprinted home from third.

Barmes' homer to left on a 3-2 count with one out in the fifth was his fourth of the season and first since June 4.

But Barmes was the only hitter on whom Karstens went to a three-ball count against. Karstens, who threw 72 of his 95 pitches for strikes, lowered his ERA to 2.55. After starting the season in the bullpen, he ranks 10th among all qualifying starters in the majors.

Rodriguez (6-5) was charged with five runs, eight hits and two walks with six strikeouts in six innings. He fell to 3-2 since returning from a stint on the disabled list with an elbow injury. Rodriguez hadn't allowed a run in three of his previous four starts.

Notes: Karstens entered the game with the fifth-best walks-per-nine-innings ratio in the NL. ... Pittsburgh has won six of its past seven at home and has a seven-game winning streak against Houston. ... The Pirates finished the 1992 season 96-66 and NL East champions. ... Rodriguez had won his past four starts against the Pirates, having allowed a total of four earned runs in that time. ... Each of the three pitchers used by the Astros had the same surname. RHP Fernando Rodriguez worked a scoreless seventh on the day he was recalled from Triple-A, and RHP Aneury Rodriguez pitched a perfect eighth.