PITTSBURGH (AP) -- All Jimmy Paredes was thinking about was catching the ball. Same with Jake Elmore.
Not that concentration helped.
Russell Martin's bases-loaded fly ball popped out Paredes' glove when he ran into the second baseman with two outs in the ninth inning, and the second missed catch of the night by a Houston right fielder helped the Pittsburgh Pirates rally past the Astros 5-4 Friday.
''I'm anticipating the ball being hit to me, just like I do on every pitch,'' Paredes said. ''All I'm thinking about is catching the ball for the third out. That's all I wanted to do. I was watching the ball and then I hit into him. Sometimes things like that happen in this game, and it's frustrating to lose like this.''
Houston manager Bo Porter said Paredes, who was charged with an error, should have peeled off and let Elmore make the play. Paredes collided with second baseman Jose Altuve on Monday night while chasing a pop fly at Detroit.
''It's not a lack of communication, because there's only one person that should be communicating,'' Porter said. ''The infielder is not saying anything. If he gets underneath the ball, the outfielder is running in and he's looking at the infielder. And if the infielder is waving his hands and under the ball, you let him take the ball.''
That wasn't Houston's only fielding foible.
Down 4-1, Pittsburgh started its comeback in the sixth when Chris Carter, usually a designated hitter, dropped Andrew McCutchen's fly ball to right for a three-base error and Garrett Jones followed with a double.
Pedro Alvarez hit a two-run homer in the eighth, a 462-foot drive that cleared the right-field stands and went into the Allegheny River on one hop.
Starling Marte singled off Edgar Gonzalez (0-1) leading off the ninth, and Travis Snider hit into a forceout, with the Astros failing to turn a double play with a late relay throw to first by Elmore.
McCutchen's single put runners at the corners, and Gonzalez fielded Brandon Inge's comebacker and dropped it for an error as he turned to throw to second, missing his chance to start an inning-ending double play.
Neil Walker took a called third strike with a full count, and Martin lifted a full-count pitch to short right-center field, where Elmore settled under the ball and Paredes slammed into him as the ball hit his glove and fell to the field.
''In that situation, the crowd is so loud that you can't hear anybody calling for the ball,'' Elmore said. ''We had already let one ball drop, and I didn't want to a second one to fall, too. I was waving my arms, hoping Jimmy would see me, but he had his eye on the ball the whole time.''
Justin Wilson (4-0) pitched a scoreless ninth as the Pirates (25-17) won for the seventh time in eight games to move a season-high eight games over .500.
''This game's crazy sometimes,'' Pittsburgh manager Clint Hurdle said. ''The crowd helped us there on the error. They made it tough on the fielders and they created a break for us.''
McCutchen homered and had three hits for Pittsburgh.
Houston's 11-31 start is its worst and matched Miami for the poorest record in the major leagues.
Astros starter Jordan Lyles allowed two runs - one earned - and four hits in five innings and is 0-4 with a 6.75 ERA in six career starts against Pittsburgh.
Pirates starter Jeanmar Gomez gave up four runs - three earned -- and five hits in 4 2-3 innings.
Houston built a 4-1 lead on Jason Castro's sacrifice fly in the first and a three-run third that included Matt Dominguez's solo homer, Elmore's run-scoring single and a throwing error by Walker at second.
McCutchen homered in the first.
''Our defense has been one of our strong suits pretty much the whole year,'' Porter said, ''but tonight we did not play good defense and we put ourselves in position where it cost us the ballgame.''
NOTES: The Pirates placed RHP Jose Contreras on the bereavement list and recalled RHP Jared Hughes from Triple-A Indianapolis. ... Altuve missed his third straight game because of the death of his grandmother and will be activated from the bereavement list prior to Saturday night's game. Elmore likely will be optioned back to Triple-A Oklahoma. ... Astros RHP Bud Norris will start Tuesday against Kansas City rather than Sunday against Pittsburgh. He left Monday's start because of lower back spasms while warming up for the sixth inning. RHP Lucas Harrell and LHP Dallas Keuchel both had their turns moved up a day. Harrell will face the Pirates on Sunday and Keuchel will pitch Monday against the Royals. ... LHP Philip Humber accepted an outright assignment to Oklahoma after Houston designated him for assignment last weekend. Humber was 0-8 with a 9.59 ERA in nine games, including seven starts, for the Astros. ... LHP Erik Bedard (0-2, 6.67) will start Saturday night for Houston against RHP A.J. Burnett (3-4, 2