HOUSTON (AP) -- Chris Nelson got a second chance to make up for a missed opportunity, and his patience paid off.
Nelson walked with the bases loaded in the 13th inning and the Colorado Rockies snapped a nine-game losing streak with a 4-2 victory over the Houston Astros on Saturday night.
Pinch-hitter Tommy Field sparked the winning rally with a leadoff walk. Eric Young then reached on a bunt single against Jordan Lyles (2-8), with Field going on to third on an error by catcher Humberto Quintero .
Young moved up on defensive indifference, but Mark Ellis grounded out. Dexter Fowler was intentionally walked to set the stage for Nelson, who forced home the tiebreaking run. Pinch-hitter Wilin Rosario added a sacrifice fly.
Matt Reynolds (1-2) pitched an inning to get the victory and Rafael Betancourt finished for his seventh save in 10 opportunities.
"You could make a case for Betancourt being in the game four or five innings before he actually got in there to pitch," Rockies manager Jim Tracy said. "It goes back to the opportunities we had with runners in scoring position with less than two outs."
Each team had their chances late in the 200,000th regular-season game in major league history.
The Rockies put runners on second and third with one out in the 11th and failed to score. Nelson hit a dribbler to pitcher Fernando Rodriguez , who underhanded the ball to Quintero in time to get Young at home. Fowler took third base on the play but Ty Wigginton was called out on strikes and ejected when he slammed him batting helmet to the ground.
Houston had runners on first and second with two out in the ninth but pinch-hitter Matt Downs bounced into a fielder's choice. Downs stayed in the game at first base and popped out with two down and runners on second and third in the 11th.
"The thing that is frustrating is we were 0 for 8 or 0 for 9 with runners in scoring position," Astros manager Brad Mills said. "You'd like to get a couple of bunts down to keep the opportunity alive, to keep it moving."
Brett Wallace hit a leadoff drive in the second to give the Astros a 2-0 lead. Wallace's fifth homer traveled an estimated 448 feet to center field.
Jordan Pacheco hit a tying two-run double in the fourth for Colorado.
J.A. Happ of the Astros and Rockies starter Jason Hammel each allowed three hits in seven innings.
"You had to feel good about what you saw from Jason Hammel ," Tracy said. "He was absolutely the same as he's been in his last three outings. He pounded the strike zone. He was aggressive. His pitch efficiency was terrific."
Hammel struck out three and walked one. The right-hander is 0-1 with a save and a 1.85 ERA in his last seven appearances, two starts.
"Obviously, I wish I'd figured it out a lot earlier, maybe this season would have gone a little differently," he said. "Hindsight is 20-20. We'll get back to work in the offseason and come back to work."
Happ struck out five and walked four while throwing a season-high 126 pitches.
"With Happy, when he gave up the two runs in the fourth inning, and the walks, that was kind of tough," Mills said. "But after that I think he only gave up three hits. He threw well over 120 pitches and got us through.
"Our bullpen did so well in this game. Jordan did such a good job for us last night that we thought he was going to be consistent just like he was last night."
NOTES: The Astros are 11-5 at home since August 16 and 16-14 at home in the second half. ... Lucas Harrell will start Sunday for Houston in place of Bud Norris (biceps tendinitis). ... The Astros recognized second baseman Jose Altuve as the team's minor league player of the year during a pregame ceremony. ... Astros closer Mark Melancon has 10 consecutive scoreless appearances.