Mike Aviles homered and the Boston Red Sox bullpen just barely avoided another big collapse in a 7-6 victory over the Minnesota Twins on Wednesday night.

Alfredo Aceves struck out Denard Span with the bases loaded in the ninth inning for his fourth save in six chances as the Red Sox completed the sweep.

Dustin Pedroia tripled, doubled and singled for the Red Sox. The Twins have dropped five in a row.

Clay Buchholz (2-1) had another shaky outing for the Red Sox, giving up five runs on 10 hits with three walks in 5 1-3 innings.

The Red Sox led 7-1 after five innings, but their beleaguered bullpen was able to hang on with 3 2-3 scoreless innings of relief.

Aceves walked Trevor Plouffe, gave up a hit to Ryan Doumit and hit Alexi Casilla in a tense ninth inning. But he got Span to chase a pitch up and out of the zone to escape the jam.

Joe Mauer had two hits and two RBIs and Anthony Swarzak pitched three innings of scoreless relief to keep the Twins in the game after another terrible outing from their starting pitcher.

Liam Hendriks (0-1) gave up seven runs on nine hits and two walks in four innings.

Aviles hit a three-run homer in the second inning and the Red Sox were cruising with a six-run lead heading into the sixth. But after the Sox blew a 9-0 lead against the Yankees on Saturday, no one was taking anything for granted.

Buchholz needed all the cushion he could get, and so did the Boston bullpen, which entered the night with the worst ERA in the American League. Buchholz carried a 9.00 ERA into the game, with his confidence in his changeup shaken and still smarting from giving up five home runs in a 6-2 loss to the Yankees last week.

Buchholz danced in and out of trouble for the first five innings, stranding eight runners on base before getting knocked out in the sixth. The right-hander gave up an RBI double to Span and left after walking Jamey Carroll to load the bases with one out in the sixth. Bobby Valentine went with righty Scott Atchison to face the lefty Mauer, who ripped a single back up the middle to score Casilla.

Valentine then went to the rookie lefty Justin Thomas against the lefty Justin Morneau, who hit the first pitch off the wall in right-center field for a double to make it 7-5.

Thomas then hit Chris Parmelee in the helmet with a pitch. The crowd grew hushed after the ball slammed off the bill of Parmelee's helmet and bounced all the way over to the Red Sox dugout. Parmelee left the game for precautionary reasons, and the team said he would be reevaluated on Thursday.

Matt Albers then gave up a single to Plouffe to make it 7-6, but got Sean Burroughs to ground into a double play to end the inning with Boston still in front.

Vicente Padilla, Franklin Morales and Aceves each pitched an inning of scoreless relief and the runs surrendered by Atchison, Thomas and Albers were charged to Buchholz.

Cody Ross went 1 for 3 with an RBI for the Red Sox but left the game early with soreness in his left knee.

NOTES: Twins slugger Josh Willingham missed the game to attend the birth of his son, Rogan. Willingham is on three-day paternity leave. ... The Red Sox open a four-game series in Chicago against the White Sox on Thursday. They send Felix Doubront (0-0, 3.94) to the mound to face Phil Humber (1-0, 0.63), who is coming off of a perfect game in his last outing. It's been a big week for Humber, who flew home from Oakland to be with his wife for the birth of their first child. "I hope he's tired," Valentine said. ... The Twins have a day off on Thursday before hosting the Kansas City Royals this weekend. RHP Carl Pavano (1-2, 4.73) will start the opener on Friday against Royals LHP Danny Duffy (1-2, 3.63).