HOUSTON - With the Houston Astros needing him to pitch well, Dallas Keuchel felt no pressure. Rather, he was totally at home.

Keuchel improved to 15-0 at Minute Maid Park this season, leading the Astros past Texas 4-2 Sunday and cutting the Rangers' lead in the AL West to 2 1/2 games.

"It's honestly something I never really expected because this is a so-called hitter's park, with the dimensions and everything," Keuchel said. "It feels like I am at home home here this year. I have steadily improved over the years."

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 stayed a half-game ahead of the Los Angeles Angels, with Minnesota trailing by 1 1/2 games.

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.

Luke Gregerson threw a perfect ninth for his 29th save.

Martin Perez (3-6) allowed two runs — both unearned — and five hits in six innings.

Keuchel has allowed two runs over his last two starts after giving up nine in 4 2-3 innings against Texas on Sept. 16.

"I think I was actually the exact same," Keuchel said. "They were hitting pitches the last start, and they weren't doing that today. I can't really chalk it up to anything."

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.

"I've seen Dallas pretty good this year," manager A.J. Hinch said. "For him to step up after the first inning when a couple things didn't go his way - he gives u the cheap run, they scratch one across - he was as dominant as he's been the whole game."

Houston also clinched its first winning season since 2008.

"It's definitely nice because nobody likes to lose," Keuchel said. "It doesn't matter if it's professional ranks or college, nobody really likes to lose. We've done a lot of that these last couple of years. The turnaround has been nice. Guys are playing with more confidence; guys are maturing; guys are growing, and that is fun to see."

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.

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.

The Rangers now head home to Arlington for their final seven games.

"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."

Perez retired 11 straight from the second until the sixth, snapped by 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.

"Before I came here, the guys worked so hard to be where we are now," Perez said. "I think it's time to finish what we started. We got a good group of guys. We play together every day. That's what you have to do as a team."

TRAINER'S ROOM

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, Hinch said. "We hope that early in the next series he can test it out in a game," Hinch said.

UP NEXT

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.