It was Boston's closer who lost this game, and now the Red Sox have some relief issues of their own to sort out.
Peralta hit a two-run homer off Andrew Bailey in the bottom of the ninth to give the Tigers a 4-3 victory over the Red Sox on Thursday night. Boston led 3-2 when Victor Martinez drew a leadoff walk off Bailey, and Peralta followed with a line drive over the fence in left field for his seventh homer of the year.
"I don't try to hit a home run, but I try to have good contact with the ball," Peralta said. "That's what happened when I had good contact."
Detroit manager Jim Leyland said before the game he was ready to use Joaquin Benoit to close instead of struggling Jose Valverde -- although he stopped short of officially naming Benoit as the closer for the long term.
After the game, Red Sox manager John Farrell said Bailey could be given a break from closing.
"Yes, I think so," Farrell said when asked if he'll look at other options to close out games. "That might be backing him out of that [role] to get him some work to get on track a little more. We'll talk more about that internally, about making a potential change."
Bailey (3-1) missed time in May because of a bicep problem. Joel Hanrahan, Boston's top choice to close, is out for the season after elbow surgery.
David Ortiz homered and drove in a tiebreaking run with an eighth-inning single to put Boston up, but Drew Smyly (3-0) replaced Phil Coke for Detroit and prevented any further scoring by the Red Sox. He struck out four in two innings of relief.
Detroit improved to only 2-19 when trailing after eight innings.
Then Leyland brought in Coke, the left-hander who has struggled against right-handed hitters. Coke struck out the left-handed hitting Jacoby Ellsbury to end the Boston seventh, but he walked switch-hitting Shane Victorino and right-handed hitting Dustin Pedroia to start the eighth.
The lefty-swinging Ortiz followed by pulling a base hit to right to give the Red Sox the lead.
Ortiz was 1 for 15 off Coke before that hit, which is why Leyland stuck with the left-hander and hoped he could get out of trouble.
"He didn't do very good, because he walked guys," Leyland said. "He gets those two guys out, he probably gets Ortiz out. But he walked them, and that's a no-no."
Peralta made up for that with one swing and was of course mobbed at the plate.
"I see everybody at home plate, it's a good feeling, hitting a walk-off home run," Peralta said. "It's the best that I can feel."
Smyly, one Detroit reliever who has been terrific this year, kept the deficit at one and gave the Tigers a decent chance at a comeback.
"It's too late to score three or four runs. You've got to keep it where it's at," Smyly said. "I'm glad I was able to do that."
Alvarez, who held Cleveland to a run in six innings in his major league debut earlier this month, handled Boston's lineup reasonably well, but Ortiz went deep in the fourth for his 15th homer of the season, a solo shot to open the scoring.
Jose Iglesias led off the fifth with a triple and scored on Ellsbury's single to make it 2-0.
In the bottom of the fifth, Torii Hunter's soft line drive with the bases loaded fell in for a two-run single, tying the game.
Alvarez is expected to make at least one more start for the Tigers in place of the injured Anibal Sanchez.
Detroit scratched OF Matt Tuiasosopo before the game because of a mildly strained intercostal muscle. ... Farrell announced that RHP Allen Webster will start Saturday night's game against the Tigers. ... Boston LHP Jon Lester (6-4) faces Detroit RHP Doug Fister (6-4) on Friday night.
Information from ESPNBoston.com contributor Chuck Pleiness and The Associated Press was used in this report.