OAKLAND -- Josh Donaldson hit a game-ending three-run homer off Joe Nathan with one out in the ninth and Scott Kazmir pitched his first complete game in nearly eight years to help the A's rally for a 3-1 victory over the Detroit Tigers on Wednesday night.
Anibal Sanchez was in command, allowing only two hits as he took a shutout bid into the ninth inning before Oakland rallied to hand the Tigers their eighth loss in 10 games.
Coco Crisp got it started with one out when he hit an opposite-field double just inside the third-base line that ended Sanchez's night after 111 pitches.
John Jaso greeted Nathan with a single off third baseman Nick Castellanos' glove before Donaldson hit a towering drive into the left-field seats for his second career walk-off homer. He also did it April 12, 2013, against the Tigers.
Nathan (2-1) blew his fourth save in 16 chances.
Kazmir (6-2) allowed six hits and no walks with eight strikeouts, giving up only a solo homer to Torii Hunter in the fourth inning in his second career complete game.
Sanchez, who won the 2013 ERA title in the American League, missed around three weeks with a finger injury on his throwing hand but is finding his groove now. He followed up a strong seven-inning outing against Texas last week with an even better start against the first-place A's.
Sanchez faced the minimum through three innings with center fielder Rajai Davis making a diving catch in the gap to rob Yoenis Cespedes of extra bases in the second inning and the Tigers turning a well-executed 3-6-1 inning-ending double play after Josh Reddick walked in the third for Oakland's first baserunner.
The A's got their first hit the following inning when Donaldson hit a clean single to center. Sanchez was helped again by his defense after that with first baseman Miguel Cabrera snaring a liner by Brandon Moss to end the inning and preserve the 1-0 lead.
The Tigers had gone ahead in the top half of the inning when Hunter hit a drive over the fence in right-center for his eighth homer of the season. Hunter hit a game-tying solo shot in Detroit's 6-5 win Tuesday night.
Sanchez pitched out of trouble in the sixth after a one-out double by Eric Sogard. But Sanchez got Coco Crisp to fly out and John Jason on a groundout.
Detroit manager Brad Ausmus won a replay challenge in the second inning when he argued J.D. Martinez beat the throw to first on a potential inning-ending double play. Martinez was ruled safe after the review but it did not matter a Alex Avila followed with an inning-ending groundout.
The A's also won a review in the ninth inning when replay showed Miguel Cabrera was thrown out at second by Cespedes in left field trying for a double.
NOTES: Kazmir's only other complete game came in a 3-0 win over Boston on July 3, 2006. ... Donaldson has reached base safely in 46 of his past 47 games. ... Davis left in the seventh inning with a bruised left shoulder. ... Jesse Chavez (4-1) will start the series finale on Thursday for Oakland against Rick Porcello (7-1).