Alex Avila homered twice, including a go-ahead blast in the eighth inning, to lift the Detroit Tigers to a 3-2 win over the Kansas City Royals in the rubber match of a three-game set.
Max Scherzer spun seven innings of one-run ball, matching a season-high with 12 strikeouts as the Tigers' magic number to win the AL Central was reduced to nine. Drew Smyly (6-0) uncorked a wild pitch in the top of the eighth that led to KC's tying run, but he was nonetheless credited with the win.
Joaquin Benoit shut the door in the ninth for his 20th save of the season.
Avila drove in all three Detroit runs while Prince Fielder went 3-for-4 and Miguel Cabrera, Victor Martinez and Ramon Santiago all had a pair of hits.
Jeremy Guthrie (14-11) absorbed the loss after pitching all eight innings for Kansas City, allowing three runs on 13 hits. The Royals fell 3 1/2 games behind Tampa Bay for the final wild card spot in the American League.
Alex Gordon hit his 20th home run in the losing effort.
The home team took an early edge in the second inning when Andy Dirks led off with a single to left. Omar Infante took Dirks' place on first base after a fielder's choice grounder, setting up Avila's two-run shot to left.
Gordon started off the fourth inning with a home run of his own, bringing KC to within 2-1. Scherzer went on to strike out the side in the fourth and sixth innings.
Alcides Escobar doubled to lead off the eighth against Smyly and stole third on an Emilio Bonifacio strikeout two batters later. With two outs, Smyly's pitch to Eric Hosmer got away from Avila and allowed Escobar to trot home and tie the score.
With one away the bottom of the eighth, Avila took the third pitch he saw from Guthrie over the wall in right-center.