PHOENIX -- Collin McHugh earned his 19th victory, Colby Rasmus homered twice and the Houston Astros beat the Arizona Diamondbacks 6-2 on Saturday night to clinch at least a tie for the American League's second wild card.
The Astros remained in contention for the AL West title as well as the league's first wild card.
McHugh (19-7), pitching a night after teammate Dallas Keuchel won his 20th game, allowed a run and six hits in seven innings to improve to 6-0 in his last seven starts. Jose Altuve homered and doubled for Houston.
Paul Goldschmidt hit his 32nd home run for the Diamondbacks.
The Astros, who set a club scoring record in a 21-5 rout of the Diamondbacks on Friday night, have won six of seven to help scramble the AL playoff picture.
The Los Angeles Angels' 11-10 comeback win at Texas left Houston a game behind the first-place Rangers. An Astros win on Sunday and a Rangers loss would send Houston into a one-game tiebreaker at Texas on Monday for the division crown. The loser would play the New York Yankees in the wild-card game.
If the Astros lose on Sunday and Los Angeles wins, the Angels would come to Houston on Monday for a tiebreaker to determine the second wild card. A Houston loss and a Texas victory would give the Astros the No. 2 wild card and a trip to Yankee Stadium.
And if Houston and Texas both win, the Astros could wind up the top wild card and host the Yankees if New York loses its regular-season finale at Baltimore. Houston holds the tiebreaker over the Yankees because it won the season series 4-3.
Rasmus led off the fourth and eighth with his 24th and 25th home runs, respectively.
Altuve doubled and scored on Carlos Correa's sacrifice fly in the first, then hit a solo home run off Jeremy Hellickson (9-12) in the fifth.
Altuve was hit in the hand by David Hernandez's pitch with the bases loaded in the eighth inning. He shook his hand in pain but stayed in the game.
The Astros are a major league-best 15-3 in interleague play, 8-1 on the road.
The right fielder made a big play for each team.
Socrates Brito's perfect, one-bounce throw caught Houston's Chris Carter trying to advance to third on a flyout in the second. George Springer's driving grab down the right-field line for Houston robbed Aaron Hill in the third.
Astros: OF Carlos Gomez sat out his second consecutive game with sore ribs.
Diamondbacks: Manager Chip Hale said OF David Peralta won't play again this season due to an injured right wrist. OF Ender Inciarte (shin) missed his second straight game with a sore shin.
Astros: Manager A.J. Hinch did not say before the game whether rookie RHP Lance McCullers (6-7, 3.21 ERA) or RHP Mike Fiers (2-1, 3.32) would start on Sunday.
Diamondbacks: LHP Robbie Ray (5-12, 3.12), who has allowed two earned runs in his last two starts, takes the mound in Arizona's last game of the season.