DETROIT (AP) -- Cole Hamels threw six strong innings, and Mike Napoli and Chris Gimenez homered as the Texas Rangers held onto the second American League wild card spot with a 4-2 win over the Detroit Tigers on Sunday.
The Rangers, who have won nine of their last 11 games, started the day with a half-game lead over the Angels, with Baltimore another half-game back.
Hamels (7-8) got the win, allowing two runs on eight hits and two walks. He struck out two. Shawn Tolleson, the third Rangers reliever, pitched the ninth for his 25th save.
Matt Boyd (1-4) gave up three runs on five hits and three walks in six innings.
Mitch Moreland put Texas ahead with a two-run double in the sixth.
The Tigers took a 1-0 lead in the second after a terrible throw by Shin-Soo Choo. With Ian Kinsler on first, Miguel Cabrera singled to right. Kinsler challenged Choo's strong arm, and the throw sailed over third baseman Adrian Beltre and Hamels before slamming into the lip of the dugout roof. Kinsler was awarded home and Cabrera ended up on second.
Gimenez tied the game in the third with a homer to left, but Jose Iglesias put Detroit back in front with a fourth-inning RBI single.
Beltre and Rangers manager Jeff Banister were both ejected in the fifth inning in an odd sequence. Home plate umpire Adam Hamari ejected one of the two from the dugout, apparently for arguing balls and strikes. That brought Banister out of the dugout for a lengthy argument.
After he had returned to the bench, Beltre began arguing with first base umpire Ron Kulpa, and Banister traveled the length of the dugout to join in. At that point, Kulpa made the second ejection, bringing Banister back onto the field for a more heated argument.
An inning later, the short-handed Rangers took the lead. Boyd hit Choo with an 0-2 pitch, and Elvis Andrus, who had entered the game for Beltre, followed with a bunt single. He appeared to hurt himself hitting the bag, but stayed in the game.
Moreland followed with a double to right that scored both runners, although Andrus wasn't running well. Napoli made it 4-2 with a homer in the eighth, the first allowed by Blaine Hardy in 84 2-3 innings dating back to June 27, 2014.
Rangers: DH Prince Fielder and Andrus were out of Sunday's lineup for regularly scheduled days off, although Andrus had to cut his short after Beltre's ejection.
Tigers: RHP Shane Greene is expected to miss the remainder of the season due to a pseudoaneurysm in his throwing shoulder. The weakened blood vessel has caused loss of feeling in his middle finger, and he will be examined by a thoracic surgeon this week.
Rangers: Texas is off Monday before starting a three-game home series with Toronto.
Tigers: Detroit was scheduled for an off day in the middle of a seven-game homestand, but will now travel to Cincinnati to make up a game that was rained out on June 18. Buck Farmer (0-2, 8.39) will start for the Tigers, while Keyvius Sampson (2-1, 3.18) goes for Cincinnati.