DETROIT -- Jordy Mercer capped a comeback from a six-run deficit with a game-ending single off Chance Adams in the ninth inning, and the Detroit Tigers overcame six home runs by the Yankees to beat New York 12-11 on Tuesday night.
Brett Gardner and Didi Gregorius each homered twice, and Gleyber Torres and Edwin Encarnacion also went deep for the Yankees, whose 276 homers tied Minnesota for the major league lead.
New York, with a 95-51 record to Detroit's big league-worst 43-100, led 6-0 in the second inning. But the Tigers tied the score with six runs in the third, aided by an error by Torres at second base.
With the Yankees ahead 6-2, Torres dropped a throw from Gregorius at shortstop on what appeared to be an inning-ending double play by Dawel Lugo off Luis Cessa, who had just replaced Nelson Cortes Jr. Christin Stewart hit a sacrifice fly, Travis Demeritte added a RBI single and Grayson Greiner hit a two-run single.
Greiner doubled with one out in the ninth off Chance Adams (1-1) and Mercer's single to the gap in right-center scored and pinch-runner Willi Castro. Tigers closer Joe Jimenez (3-8) pitched a perfect ninth. New York built the lead off Edwin Jackson as Gardner had a solo homer in the first and hit a two-run drive to cap a five-run second that included Mike Ford's RBI single and Tyler Wade's two-run triple.
Solo homers by Torres in the fourth and Gregorius in the fifth off Tyler Alexander put the Yankees ahead 8-6, but the Tigers burst to a 10-8 lead when Christin Stewart hit a solo homer off Cessa in the fifth, then Miguel Cabrera had a sacrifice fly against Cory Gearrin in the sixth and Jeimer Candelario followed with a two-run single.
Encarnacion tied the score in the seventh off John Schreiber, and Gregorius homered off Daniel Stumpf for an 11-10 lead. Mercer walked against Adam Ottavino in the bottom half, advanced on Gary Sanchez's seventh passed ball this season and scored on Harold Castro's single.
Yankees: LHP Jordan Montgomery (Tommy John surgery) and RHP Dellin Betances (lat strain) both pitched for Double-A Trenton. Montgomery started and allowed two runs and two hits in three innings. Betances allowed one hit in a scoreless inning, striking out two. ... RHP Tommy Kahnle has right wrist tendinitis and did not pitch.
Tigers: Castro didn't start because of a bruised forearm sustained when he was hit by a pitch on Saturday.
Yankees LHP CC Sabathia (5-8, 4.93) returns from his fourth trip to the IL this year to start Wednesday night. Sidelined by a chronically painful right knee, Sabathia last pitched on Aug. 30. LHP Matt Boyd (8-10, 4.57) starts for Detroit.