Leonys Martin hit a three-run double, Ian Kinsler homered and the Texas Rangers kept pace in the AL wild-card chase, beating Houston 7-3 Wednesday night and handing the Astros their team-record 108th loss of the season.
The Astros lost their 12th in a row. Texas completed a three-game sweep and finished 17-2 with 11 straight wins against their instate rival.
The Rangers remained a game behind Cleveland for the AL's second wild-card spot -- Tampa Bay is a game ahead of the Indians. Texas has four games left in the regular season, with the series opener at home against the Los Angeles Angels on Thursday night.
Rookie left-hander Martin Perez (10-5) struck out eight over seven innings.
Martin's bases-loaded double was the big blow for the Rangers when they had seven consecutive batters reach with two outs in the fourth off Dallas Keuchel (6-10). That put the Rangers up 4-3, and Martin scored on a single by Kinsler.
Alex Rios added an RBI single before Adrian Beltre's hard liner ended the inning.
Kinsler's 13th homer, a solo shot in the sixth, chased Keuchel.
Before sweeping Houston, the Rangers hadn't won consecutive games since a three-game sweep at Seattle from Aug. 26-28. They had an AL-best record of 20-7 in August and a two-game lead in the AL West before starting this month 5-15 while Oakland claimed the division title for the second year in a row.
The Astros tied the 2001-03 Detroit Tigers for the fifth-most losses over a three-year span at 321, according to STATS. They trail only the 1962-64 New York Mets (340), the 1963-65 Mets (332), the 1915-17 Philadelphia Athletics (324) and the 1940-42 Phillies (323).
After a day off Thursday, the Astros complete their season with three games at home this weekend against the New York Yankees.
The Rangers' 17 wins are the most Texas has ever had against a team in the same season. The last team with 17 wins against another opponent was Oakland over Seattle in 2006.
Houston finished with a 27-54 record on the road, still its most wins away from home since 2010.
Ten of the first 11 outs by Texas came on groundballs against Keuchel, one of the majors' best with a 2½-to-1 ratio of groundballs to flyballs.
In the Rangers third, Craig Gentry reached on a throwing error by shortstop Jonathan Villar. After a stolen base and a wild pitch, Gentry scored when Elvis Andrus hit what could have been an inning-ending double play grounder. But the ball slipped out of second baseman Jose Altuve's hand when he tried to make the relay throw to first.
Altuve, whose 39 hits in September are most in the majors, opened the Astros fourth with a double off the left-field wall and scored on a single by Chris Carter. Brandon Laird's two-run homer made it 3-1.
Keuchel got the first two outs of the fourth on grounders before the Rangers loaded the bases on Jeff Baker's single, a walk and a hit batsman. Martin cleared the bases with a double to right.
Houston had 12 strikeouts in the game, increasing its franchise-record season total to 1,504. That is 25 shy of the major league record set by Arizona in 2010.
NOTES: The Astros also had a 12-game losing streak last year. ... Villar has 15 errors in 54 games. ... Houston was 1-8 this season at Rangers Ballpark, the only win a game Keuchel started July 6. ... The Texas Rangers Baseball Foundation, along with players Derek Holland, Joe Nathan and Andrus, made a $20,000 check presentation to the Southeast Arlington Little League after the league's former president was accused of taking more than $20,000 from the organization.