BOSTON (AP) — Stephen Drew doubled in the winning run with two outs in the 11th inning, and the Boston Red Sox rallied past the Minnesota Twins 6-5 on Monday night to snap a season-high, three-game losing streak.

Drew, who entered the game batting .182, homered and had four hits. Dustin Pedroia hit a solo shot in the eighth for a 5-4 lead, but Joel Hanrahan gave up Brian Dozier’s homer in the ninth and left one out later with right forearm tightness.

Clayton Mortensen (1-2) earned the win with 2 1-3 innings of scoreless relief. Pedroia and Shane Victorino had three apiece, and David Ortiz doubled in the eighth to extend his hitting streak to 26 games.

Jared Burton (0-1) retired his first two batters in the 11th, then gave up a swinging bunt single to Jarrod Saltalamacchia when the pitcher’s throw pulled first baseman Justin Morneau off the bag. Will Middlebrooks singled, and Drew hit a line drive to the base of the Green Monster in left-center.

It was Boston’s first walkoff win since Mike Napoli’s ninth-inning double beat the Tampa Bay Rays on Marathon Monday, just a half-hour before two bombs exploded at the race’s finish line.

Red Sox starter Clay Buchholz struggled early, falling behind 4-1 after five innings. But the Red Sox came back with single runs in five straight innings, including Pedroia’s homer off a Green Monster light stanchion that broke an eighth-inning tie.

It was Pedroia’s first homer since Sept. 11 — a span of 184 at-bats for the 2008 AL MVP.

One start after Toronto broadcaster Jack Morris accused him of throwing a spitball, Buchholz was rescued from his first loss of the season by the Boston comeback. There was no follow-up to the allegations, which Buchholz has denied, except that he had his worst outing this season.

Buchholz, who had won his previous six starts this year, gave up back-to-back doubles off the Green Monster to Joe Mauer and Josh Willingham in the first inning, then fell behind 4-1 in the fifth. The right-hander allowed four runs, seven hits and two walks, striking out nine in six innings as his ERA rose from 1.01 to 1.60.

That gave Minnesota starter Vance Worley a chance to end a losing streak dating to August. But Jacoby Ellsbury doubled and scored in the fifth; Victorino, who homered in the fourth, singled and scored in the sixth; and Drew homered to right in the seventh to tie it 4-all.

Pedroia homered in the eighth with a high fly ball that bounced off the light support above the left-field wall.

Worley allowed three runs and nine hits in five innings. Since winning at the Washington Nationals on Aug. 1, he is 0-7 with a 6.87 ERA in 12 starts.

Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.