HOUSTON (AP) -- The Texas Rangers' offense couldn't back Martin Perez and his six strong innings, and that left the door open for the Houston Astros in the AL West.
Dallas Keuchel improved to 15-0 at home this season, pitching the Astros past Texas 4-2 Sunday and cutting the Rangers' lead to 2 1/2 games.
The Rangers head back to Arlington for their final seven games under the assumption that Houston will put up a strong fight for the crown.
"Safe? There's nothing safe in baseball," Texas manager Jeff Banister said. "You've got to continue to play. It's about competing. These guys, they've never taken that approach. We've been playing from behind all year long.
"We've worked way too hard to get to this point to think that anything is safe. We know this club's not going to lay down. That's not a fair assessment. I think more than anything else, this is a ball club that knows grind, knows how to compete, and they're going to go out and compete."
Perez (3-6) allowed two runs - both unearned - and five hits in six innings.
Perez retired 11 straight until Carlos Correa's single with one out in the sixth. He rebounded after allowing five runs in four innings in his last start against Oakland.
"I thought he had some really good competing moments through the ballgame to work his way out of some different situations," Banister said.
Along with closing in on Texas with a week left in the regular season, the Astros held their lead for the second AL wild-card spot. They're a half-game ahead of the Los Angeles Angels and 1 1/2 games in front of Minnesota.
Keuchel (19-8) struck out 10, giving up just one run and two hits in seven innings. The lefty retired 15 straight batters after walking Elvis Andrus in the second inning.
"Our inability to put runs on the board also, that was a challenge," Banister said. "We knew it was going to be tough. Dallas Keuchel is a solid pitcher. You give him nice strike zone, and he can be a challenge."
Prince Fielder put the Rangers up 1-0 in the first with an RBI groundout.
Rougned Odor opened the Texas eighth with a triple off Oliver Perez and scored two batters later on Delino DeShields' grounder, making it 3-2.
Luke Gregerson threw a perfect ninth for his 29th save.
Keuchel has allowed two runs over his last two starts after giving up nine in 4 2-3 innings against Texas on Sept. 16.
Keuchel set a team record for most strikeouts by a left-hander in a season when he fanned Mike Napoli in the first. Keuchel has 213 this year; Mike Cuellar fanned 203 in 1967.
Jake Marisnick gave Houston the lead with a two-out, two-run double in the second. A two-out error by shortstop Elvis Andrus set up Marisnick.
Chris Carter had two hits and greeted Ross Ohlendorf with a solo home run to left to up Houston's lead to 3-1.
Pinch-runner Carlos Gomez stole second and later scored on a passed ball in the eighth to extend the Astros' lead to 4-2.
Astros: Gomez, who had missed the last two weeks with a left intercostal strain, took more aggressive swings Sunday and will work out on the field before Houston's game Monday in Seattle, manager A.J. Hinch said. "We hope that early in the next series he can test it out in a game," Hinch said.
Rangers: RHP Colby Lewis (17-8) takes the mound Monday as Texas starts a three-game series against Detroit. He has won his last three starts and needs four innings to pass 200 innings for the season.
Astros: RHP Lance McCullers (5-7) starts the first game of the three-game series at Seattle on Monday. He is winless in his last seven starts dating back to July 29 and is 0-2 with a 3.24 ERA in four September outings.