DETROIT -- Jhonny Peralta's two-run home run on a 1-2 pitch with no outs in the ninth inning Thursday night gave the Detroit Tigers a 4-3 victory over the Boston Red Sox.
Boston closer Andrew Bailey, who blew his fourth save in 12 chances, threw three straight balls to Victor Martinez and walked him on a 3-1 pitch before dealing with Peralta.
The Detroit shortstop fended off two breaking balls, took a ball and then slammed what looked like a cutter over the left field fence for his seventh home run of the season.
Bailey (3-1) has now allowed runs in four of his last five outings.
Drew Smyly (3-0) earned the victory for two scoreless innings of relief.
A fourth-inning solo home run from David Ortiz, a tiebreaking eighth-inning single by Ortiz, and the strong pitching of John Lackey gave Boston a 3-2 lead to carry into the bottom of the ninth.
Phil Coke entered the game to strike out the last hitter of the seventh on three pitches but threw nine straight balls to put two runners on in the top of the eighth.
His first strike of the inning was gunned into right field by Ortiz for an RBI single. Smyly came in at that point and worked out of the jam, then pitched a scoreless ninth to give his team a chance to win.
Lackey faltered only in the fifth when he allowed the first two Detroit runs. He allowed seven hits but no more than one in any inning aside from the fifth. Lackey walked one and struck out five in seven innings.
Koji Uehara retired the side in order in the eighth, getting the third out on a booming Prince Fielder fly to the scoreboard in right center that was caught by center fielder Jacoby Ellsbury.
Ortiz's home run on the first pitch of the fourth produced the first run of the game.
Boston made it 2-0 in the top of the fifth when Jose Iglesias lined a triple to the gap in right center to open the inning and Jacoby Ellsbury singled him home.
Detroit tied the score at 2 in the fifth on Torii Hunter's two-run bloop single to right off Lackey.
NOTES: Detroit LF Matt Tuiasosopo was scratched due to a mild right intercostal strain. Manager Jim Leyland replaced him with left-handed-hitting Andy Dirks, who had been struggling. ... The Red Sox will recall RHP Allen Webster from Triple-A Pawtucket on Saturday night to start against Detroit. "He's been throwing the ball well," Boston manager John Farrell said, "and with much better command, especially with his fastball. I'm looking forward to seeing him here Saturday." Webster started two games for Boston earlier this season, going 0-1 with an 11.74 ERA. ... The Tigers have a new closer, RHP Joaquin Benoit taking over for Jose Valverde "if he's available and hasn't pitched too much. I'm not naming anyone the (full-time) closer because I'm not sure who would be available," Leyland said. ... Red Sox RHP Clay Buchholz threw off flat ground Thursday and was scheduled to throw a bullpen session Saturday, with an eye toward making a return to the rotation on Tuesday. Buchholz is currently on the disabled list with a neck strain. ... Boston OF Mike Carp, out since leaving Sunday's game at Baltimore with right hamstring tightness, should be ready to go this weekend. Farrell indicated that Carp was available Thursday night, but the Tigers started LHP Jose Alvarez. Carp is batting .362 with 17 RBIs in his last 19 games.