PITTSBURGH -- Two at-bats made all the difference for the Astros. The first ended with Lance Berkman hitting the decisive home run, and the other after Houston reliever Chris Sampson needed what seemed like a game's worth of pitches to get a key out.
Berkman made up for an earlier missed opportunity with a go-ahead, three-run homer in the sixth inning, and the Astros overcame an early two-run deficit to beat the Pittsburgh Pirates 6-3 on Thursday.
Hunter Pence added a solo home run as the Astros won the final two games of the three-game series. Before that, they'd lost five straight during a 1-6 start, their worst in 25 seasons.
Berkman left the bases loaded by flying out in the fourth inning with the score tied at 3. He made up for it with a drive into the left-field seats in the sixth off reliever Sean Burnett (0-1), who retired two batters before Michael Bourn doubled and Miguel Tejada drew one of Houston's seven walks off six pitchers.
Burnett got ahead in the count 1-2 but, successfully throwing Berkman a slider in the dirt, left another slider over the plate.
"If it doesn't [stay up], I probably miss it," said Berkman, whose average was down to .200. "You don't hit home runs home runs on good pitchers' pitches, it's usually a mistake. I'm sure he was trying to bury it down and in and left it over the plate."
Pirates manager John Russell allowed the left-handed Burnett to pitch to Berkman, even though right-handers are hitting .326 against him the last two seasons compared to .167 by left-handed hitters.
Burnett called it "really frustrating," saying, "I got two quick outs and let it slip away and gave the game away."
An inning later, Sampson needed 17 pitches before retiring Sanchez on a fly ball to center during an extended at-bat with runners on first and second and one out.
Often, a hitter wears down a pitcher during an at-bat that requires so many pitches.
"I think they brought a whole new case of balls in for that at-bat," Sampson said. "I threw everything. I threw my whole repertoire. I threw curveballs early in the at-bat, I threw sliders, I threw sinkers, I threw four-seamers, I was like, 'Man, I wonder what pitch can I invent to throw up there?' I didn't know if I should go sidearm or underhanded to him."
A couple of times, Sampson said, he and the 2006 NL batting champion exchanged smiles that acknowledged the extended duel.
"That was a tough battle," Sampson said. "Thankfully I came out on top. You can't give in. Somebody was going to win. He got the runner over and I got the out, so I guess we both won."
Berkman's second homer of the season, both of them right-handed, came four innings after Pence homered off a left-field catwalk, his third, to get the Astros going against Pirates starter Jeff Karstens. Pittsburgh had taken a 2-0 lead in the first.
The Astros also scored in the third on two walks, Bourn's stolen base and a groundout, and again in the fourth to tie it at 3 when Jeff Keppinger tripled and starting pitcher Russ Ortiz singled.
Ortiz didn't pitch long enough to get the decision in his first start since Aug. 20, 2007, giving up five hits and three runs in 4 2/3 innings. He sat out last season following reconstructive elbow surgery.
Wesley Wright (1-0) got the victory by retiring the only batter he faced in the sixth. The five Houston pitchers finished up with seven consecutive scoreless innings.
"Our bullpen was outstanding," manager Cecil Cooper said. "You get big swings from your big boys, you've got to make them stand up and we did."
Tim Byrdak replaced Sampson and got four outs. LaTroy Hawkins, who didn't convert his only previous save opportunity, pitched the ninth for the Astros' first save. Houston closer Jose Valverde was held out because of back soreness.
Karstens had control problems during his first start of the season, walking five while allowing four hits and three runs in 4 2/3 innings.
Pirates 3B Andy LaRoche ended an 0-for-18 slide with a single in the sixth. He is hitting .141 (26-of-184) since being traded to the Pirates last July. ... Pirates C Jason Jaramillo made his major league debut, getting a single in his second at-bat. ... Astros INF Kaz Matsui (stiff back) will be out until at least Saturday. ... Pirates LF Nyjer Morgan was 3-for-5 and reached base four times.