Updated

Shane Victorino delivered the deciding blow for a second straight night, this time a tie-breaking two-run homer in the eighth inning that capped a furious Boston comeback in the Red Sox' 12-8 outslugging of the New York Yankees.

After coming through with a clutch single in the 10th inning of Boston's wild 9-8 triumph in Friday's opener of this key four-game series, Victorino snapped an 8-8 deadlock by crushing a Preston Claiborne (0-2) slider into the left- field seats that completed the Red Sox' rally from a five-run deficit.

Boston scored five times in the seventh, highlighted by Mike Napoli's game- tying grand slam off Boone Logan, and four more in the eighth en route to its fourth straight victory.

"When you're down five runs in the seventh inning, to come back on this stage -- every game is big for us," said Napoli. "To come back to tie the game was a big moment."

Napoli finished 3-for-3 with four RBI and three runs scored, while Will Middlebrooks added a solo homer in addition to singling in front of Victorino's blast. Dustin Pedroia also collected three hits, including an RBI single.

Brandon Workman (5-2) aided the Red Sox' cause by turning in 1 1/3 scoreless innings of relief. Starter Felix Doubront struggled, though, walking six batters while being tagged for six runs in just 3 2/3 frames.

Alfonso Soriano had a two-run homer and Brett Gardner tripled in a pair of runs in what could be a crushing loss for the Yankees, who entered the day 2 1/2 games behind Tampa Bay for the final wild card spot in the AL.

"That's a tough loss," said Yankees starter Andy Pettitte. "They're all tough right now, but what are you going to do? They've got a good club, they battled us over there."

Pettitte held the Red Sox to three runs while striking out eight over six solid innings, exiting with New York owning a comfortable 8-3 lead. But one night after the Yankees erupted for six seventh-inning runs to erase a 7-2 deficit, the Red Sox turned the tables with a rally of their own.

David Ross and Victorino reached reliever Phil Hughes for singles in front of a walk to Mike Carp that loaded the bases with one out. Pedroia then beat out an infield hit to drive in a run, though Logan temporarily stopped the bleeding by fanning David Ortiz looking for the second out.

Logan wasn't as fortunate against Napoli, who launched a towering fly to right that bounced on top of the wall and over to suddenly knot the score at 8-8.

"I saw [Yankees right fielder] Ichiro [Suzuki] timing his jump," said Napoli of the homer. "I just got enough."

Victorino's go-ahead shot came an inning later, right after Middlebrooks put the lead runner on with a one-out single off Claiborne.

Boston tacked on some insurance before the eighth came to a close, with the Yankees' Joba Chamberlain walking three straight hitters to force in another run and surrendering a single to Stephen Drew that made the score 12-8.

Soriano gave the Yankees an early upper hand by following a walk to Derek Jeter with his 30th homer of the season, staking New York to a 2-0 lead after one inning.

Boston cut the deficit in half in the top of the second, when Napoli stroked a leadoff single and later came around on Ross' base hit up the middle. However, the Yankees struck again during their portion of the frame to pad the margin.

Doubront walked Vernon Wells before Eduardo Nunez laced a triple into the gap in left center for a 3-1 advantage, and the cushion grew to three runs when Chris Stewart plated Nunez with a sacrifice fly.

Napoli doubled to begin the fourth and eventually scored on a Drew groundout to bring the Red Sox within 4-2, but New York capitalized on Doubront's continued control problems in the bottom of the inning.

The lefty issued consecutive two-out free passes to Mark Reynolds and Stewart to extend the fourth for Gardner, who laced a gap shot that got past a diving Victorino in center field as both runners crossed on the triple.

Middlebrooks' third homer in as many games, a long drive into the seats in left that opened the fifth, trimmed the lead to 6-3. However, the Yankees pushed two more runs across against Rubby De La Rosa in the their half of the inning.

Robinson Cano doubled and was knocked in on a Wells two-out single, one of three straight New York hits that was capped by Reynolds' liner to right that increased the differential to 8-3.

Game Notes

The Yankees lost for only the second time in 37 games at home this season when holding a lead of at least two runs ... Boston's Jacoby Ellsbury sat out the contest with a sore right foot, while catcher Jarrod Saltalamacchia (back) missed a fourth straight game ... Napoli's slam was his third this season, one of which came off Hughes at Yankee Stadium on June 1 ... Soriano homered for the 13th time since being acquired by the Yankees from the Cubs on July 26, tops in the majors over that stretch ... Doubront's six walks matched a career high set at Tampa Bay on May 16 ... Hughes pitched in relief for the first time since Oct. 2, 2010 at Boston.