PITTSBURGH -- Jason Castro is the Houston Astros' cleanup hitter but he acted like a leadoff hitter once he got on base in the 11th inning Saturday night.
The catcher came up with the big hit -- a leadoff double off the top of the center-field fence -- then used his legs to score the winning run as the Astros beat the Pittsburgh Pirates 4-2 at PNC Park.
With the score tied 2-2, Castro hit his double off Bryan Morris (1-2). After Chris Carter, who tied the game in the eighth with a single, popped out, the Pirates intentionally walked Carlos Pena but Morris ruined the strategy by throwing a wild pitch that allowed the runners to move to second and third.
Matt Dominguez then hit a ground ball to second baseman Neil Walker but his throw was a tick too late as Castro slid home with the go-ahead run. Pittsburgh manager Clint Hurdle was ejected by home plate umpire C.B. Bucknor for arguing the call.
Pinch-hitter J.D. Martinez singled in an insurance run as the Astros (12-31) won for the second time in three games following a six-game losing streak.
Houston manager Bo Porter was more impressed by Castro's legs than his bat.
"Castro had a great heads-up read on contact and made a great slide," Porter said. "That was some real heads-up base running. You like to see that. Those are the kind of things that win you ballgames."
The Astros haven't won many ballgames this season but Porter was particularly encouraged by Saturday night's victory.
"It's a tremendous group of guys in that clubhouse," Porter said. "It's a resilient group. They have fun together. They love playing the game. They play hard. We've had our share of bumps and bruises but we played a good game tonight and we're going to put a string of games together like this at some point."
Houston had an especially tough loss Friday night as the Pirates won 5-4 when right fielder Johnny Paredes dropped Russell Martin's two-out fly ball that allowed the winning run to score.
"It says a lot about us that we were able to put that loss right behind us and come out and play a good game and beat a good team," Astros outfielder Trevor Crowe said.
Despite playing with a partially dislocated jaw and a heavy heart, Jose Altuve had three hits for Houston. He missed the previous three games while on the bereavement list following the death of his grandmother in Venezuela and injured his jaw in Monday night's loss at Detroit when he collided with Paredes while chasing a pop fly.
Castro and Carter both had two hits. Castro had been 2-for-22 in his previous seven games and Carter was 2-for-22 in the last six games.
Carter's game-tying single ended Mark Melancon's streak of 13 consecutive scoreless relief appearances that covered 13 innings.
Jose Cisnero (1-0) notched his first major-league win by striking out five in 3 2/3 scoreless innings. Jose Veras pitched the 11th for his sixth save.
"Anytime you get that kind of push like that from someone out of the bullpen, he probably should have got the win and the save, too," Hurdle said.
Andrew McCutchen had two doubles and Brandon Inge also had two hits for the Pirates, who lost for just the second time in the last nine games.
Both starters pitched well but did not figure in the decision.
Pittsburgh's A.J. Burnett allowed one run and five hits in seven innings and raised his National League-leading strikeout total to 79 with seven while Houston left-hander Erik Bedard -- the Pirates' opening day starter last season -- gave up two runs and seven hits in six innings.
The Pirates released Bedard last August after he went 7-14.
"You don't really think about who it's against," Bedard said. "You just want to win the ballgame. I don't hold a grudge about last year. It's baseball. It's a business."
Burnett was impressed by the feistiness of the Astros' hitters.
"You can talk about (the Astros') record but they're all big-leaguers, they're all up here for a reason," Burnett said. "They battled me. They had some really good swings with two strikes and they fought off some tough pitches. I felt good to get out of it with only one run allowed."
The Pirates had runners on second and third with no outs in the sixth against Bedard but managed only one run on Inge's single to move in front 2-1.
Houston tied the score at 1-1 in the fifth when Altuve hit a two-out RBI single off the body of diving third baseman Inge.
Pittsburgh scored a run in the first inning on consecutive two-out doubles by McCutchen and Gaby Sanchez.
NOTES: Houston OF Brandon Barnes entered the game in the bottom of the 11th as a defensive replacement after not being used in Friday night's game with Pittsburgh for defensive purposes because he was unable to play with a slightly sprained right ankle. Porter said Saturday that Paredes would not have been in Friday's game if Barnes were available. Porter considers Barnes to be the Astros' best outfielder. ... INF Jake Elmore was optioned to Class AAA Oklahoma City by Houston to make room on the roster for Altuve's return. ... Pittsburgh RHP Jeff Karstens (right shoulder inflammation) made his second minor-league rehab start Saturday night and pitched four innings for Class AA Altoona, allowing two unearned runs to Richmond in an Eastern League game. ... Pirates RHP James McDonald (right shoulder inflammation) played long toss Saturday and is expected to throw off a mound Tuesday for the first time since May 7, when he was placed on the disabled list. ... The Astros' Lucas Harrell (3-4, 5.11 ERA) faces LHP Jeff Locke (3-1, 3.15) on Sunday in the finale of the three-game series.