Thanks to a late rally and help from others, the Houston Astros will go into their final series knowing three more wins will have them playing baseball beyond the final day of the regular season.
A day after being passed in the race for the second AL wild-card spot, the Astros retook control Wednesday night with a 7-6 win over the Seattle Mariners.
"Just so many dramatic plays, dramatic at-bats, a lot went right our way. It wasn't pretty but at this point I don't care what it looks like, let's just get the win," Houston manager A.J. Hinch said.
More from FoxSports
Colby Rasmus' broken-bat RBI single capped Houston's rally from a three-run deficit, and the bullpen hung on to preserve the lead.
The Astros moved back ahead of the Los Angeles Angels, who lost at home to Oakland. Houston, now a half-game in front of the Angels, finishes the season with a series beginning Friday in Arizona.
"We've had to be resilient. We've been questioned all year. We've had a few streaks that have been less than our best and we've come out of it very well each time," Hinch said. "I didn't doubt our character coming into this series and I don't doubt it now."
Houston committed as season-high four errors and needed six pitchers to escape Seattle having taken two of three games. Astros relievers Will Harris and Oliver Perez worked through two errors by rookie shortstop Carlos Correa for a scoreless eighth.
Luke Gregerson pitched the ninth for his 31st save, capped when center fielder Carlos Gomez caught a line drive by Franklin Gutierrez and doubled pinch-runner James Jones off first base to end the game.
"I'm not one to show a lot of emotion on the mound but I did get pretty fired up when we got him at first base," Gregerson said.
Trailing 6-3, the Astros got a three-run homer from Chris Carter, his 24th of the season, in the sixth inning to draw even. Rasmus' blooper off Danny Farquahar (1-7) over a drawn-in infield scored pinch-runner Jonathan Villar in the seventh to give Houston the lead. Evan Gattis tripled with one out in the inning, helped by Brad Miller in right field taking a bad step and slipping.
"Sometimes this game will work in your favor and it's better to get jammed than hit it good," Rasmus said.
Luis Valbuena hit his 24th homer of the season for Houston, a solo shot as part of a three-run fifth inning. Jose Altuve and Correa also had RBIs in the inning.
Kyle Seager and Nelson Cruz hit back-to-back homers in the fifth for Seattle. Seager hit a three-run shot, his 26th of the season and a new career-high. Cruz followed with his 44th to give Seattle a 6-3 lead, putting him one behind Baltimore's Chris Davis for the most in the majors.
Seattle manager Lloyd McClendon said Cruz's timing was better.
"He's been out of whack a little bit. Big guys do that. I know that home runs come in bunches and hopefully he'll get a home run in the next few days," McClendon said.
Houston's bullpen managed to pitch shutout ball over the final four innings. Seattle had runners on the corners and two outs in the seventh but Tony Sipp (3-4) got Miller to fly out and end the threat. Perez also got a pop out from Seager to end the eighth after Ketel Marte reached second on Correa's throwing error.
Perez pitched for the sixth straight day, the first pitcher in the majors to do so this season.
Astros: Houston will go with Dallas Keuchel in the series opener on Friday night in Arizona, followed by Collin McHugh on Saturday and a starter to be determined for Sunday's regular season finale. Hinch said the decision to have Keuchel throw on Friday leaves open the chance he could pitch in the AL wild-card game next Tuesday if the Astros make the postseason.
Mariners: Felix Hernandez is done for the season and will not pitch in the final series against Oakland. McClendon said he didn't want to extend Hernandez for one more spot in games that don't have any meaning. Hernandez finished the year 18-9.
Astros: Houston has an off-day before beginning final series in Arizona against the Diamondbacks.
Mariners: Seattle has a day off before opening final series at home against Oakland.