Jhonny Peralta's two-run blast in the bottom of the ninth inning lifted Detroit over Boston, 4-3, in the opener of a four-game series between AL division leaders.
Andrew Bailey (3-1) entered with a 3-2 lead, but issued a leadoff walk to Victor Martinez and, after Don Kelly was inserted as a pinch runner, Peralta launched a ball just over the wall in left to end the game.
Drew Smyly (3-0) tossed two scoreless frames of relief, fanning four and allowing just one hit.
Torii Hunter contributed a two-run hit for the Tigers, who snapped a two-game slide.
David Ortiz homered and knocked in two runs for the Red Sox, who have dropped two in a row.
Ortiz began the third and kicked off the scoring with his 15th homer of the season, and Jose Iglesias started the fifth with a triple and scored on a Jacoby Ellsbury single to make it 2-0 for the top team in the AL East.
Detroit evened the score in the home half on Hunter's two-out, two-run single. Andy Dirks walked with one out, then Brayan Pena and Austin Jackson both singled with two down to load the bases prior to the scoring hit.
Phil Coke walked both Shane Victorino and Dustin Pedroia to begin the eighth, then served up a base hit from Ortiz that gave the Sox a 3-2 advantage. Smyly came on to get the next two batters, then plunked Ryan Lavarnway to load the bases before getting Will Middlebrooks on a fly to right.
Smyly stranded Victorino in scoring position in the ninth after the Boston outfielder doubled with two down and stole third.
The Tigers have won five in a row over the Red Sox at Comerica since May of 2011 ... Detroit starter Jose Alvarez, recalled prior to the game from Triple- A Toledo, gave up two runs and five hits over five innings, while Boston hurler John Lackey lasted seven full frames and allowed seven hits with a pair of runs ... To make room for Alvarez, the Tigers optioned outfielder Avisail Garcia to Toledo.