DETROIT (AP) -- Justin Upton hit a two-run homer off Matt Belisle in the ninth inning, giving Detroit a 12-11 win over the Minnesota Twins on Saturday night after the Tigers wasted a five-run lead and then overcame a five-run deficit.
Detroit had been 0-54 this year when trailing after eight innings and had lost six of seven but rallied to stop the Twins' six-game winning streak.
After James McCann hit a grand slam in a five-run first inning against Jose Berrios, the Twins tied the score 5-5 in the third, then scored twice in the fourth, once in the fifth and three times in the sixth for an 11-6 lead.
Upton hit a sacrifice fly in the seventh, and McCann hit into a run-scoring forceout in the eighth and scored on Jose Iglesias' home run against Trevor Hildenberger that cut Detroit's gap to 11-10.
Shane Greene (3-2) escaped a bases-loaded jam when he struck out Miguel Sano on a slider. Mikie Mahtook singled against Belisle (0-2) starting the bottom half and Upton drove a high fastball into the left-field seats.
Tigers starter Jordan Zimmermann allowed seven runs and eight hits in 3 1/3 innings, while Berrios gave up six runs and six hits in 3 1/3 innings.
Joe Mauer's three-run double and Eddie Rosario's two-run homer, a 445-foot drive over the out-of-town scoreboard in right-centerfield, tied the score in the third.
Byron Buxton homered leading off the fourth, sprinting around the bases at top speed until third-base coach Gene Glynn informed him the ball was in the seats.
TRAINER'S ROOM
Twins: LHPs Hector Santiago (back) and Glen Perkins (shoulder) are both continuing minor-league rehab assignments and could return to the Minnesota roster next week.
Tigers: 1B Miguel Cabrera left with lower-back tightness after six innings. Detroit said he is day to day.
CASTELLANOS CHANGING POSITIONS
Tigers manager Brad Ausmus said 3B Nick Castellanos will begin working out in right field and could play there by the end of the season. Castellanos has struggled badly at third base, and the Tigers recently acquired highly regarded third-base prospect Jeimer Candelario in a trade with the Chicago Cubs. Castellanos played nine games in left field in 2003 but has been exclusively at third since.
"I don't know how it will work out, but I brought it up to them," Castellanos said. "If it is beneficial to the team, I'm all for it."
UP NEXT
RHP Ervin Santana (12-7) is to start Sunday's series finale for the Twins. Santana is 9-5 with a 3.36 ERA in 20 starts against Detroit, but gave up five runs in 3 1/3 innings on July 21. LHP Matt Boyd (5-6) opens for the Tigers. He is 5-1 with a 3.52 ERA against the Twins, the only major-league team he has beaten more than twice.