BOSTON - The aspects of their team that the Yankees believe can separate them from the rest of the AL East in the second half were on display Sunday afternoon.

Power and production from up and down the lineup, including the first big-league homer of Rob Refsnyder's career, and more lockdown work from the bullpen -- though not quite as lockdown as it's been -- pushed the Yankees to an 8-6 victory over the Red Sox in front of 37,283 at Fenway Park.

The victory allowed the Yankees (48-40) to take two of three from the last-place Red Sox (42-47) and head into the All-Star break with a 3½-game lead over the second-place Rays.

"We're excited to be in the position we're in," said Brian McCann, whose two-run shot over the Green Monster off lefthander Wade Miley in the second inning gave him 14 homers and 55 RBIs. "We're in a good spot."

Refsnyder's two-run homer off Alexi Ogando in the top of the ninth gave Andrew Miller an 8-4 lead. That cushion proved helpful as McCann and Refsnyder committed errors on consecutive plays that led to two runs in the bottom half.

Refsnyder kicked himself for the error -- a drop on an imprecise throw from Miller on a force play -- but called his homer, which sailed into the last row of seats atop the Green Monster, "a really cool moment."

With a runner on second, Miller retired Shane Victorino on a pop to short to end it, giving the Red Sox 10 stranded runners to the Yankees' three.

"I don't like making it interesting. I don't like having guys on base and going through all that," Miller said. "But it's going to happen sometimes, and we survived."

Having gotten five unspectacular innings out of Nathan Eovaldi (9-2, 4.50), Joe Girardi watched his team take a 6-3 lead in the top of the sixth on RBI doubles by Alex Rodriguez, Chris Young and Chase Headley.

Brett Gardner led off with a grounder to second and Brock Holt failed to get the ball out of his glove cleanly, with the play being scored a hit. When A-Rod lined a shot into the gap in left-center and all the way to the wall, Gardner scored all the way from first, easily beating Xander Bogaerts' high throw home. Young then lined a one-out drive high off the Green Monster to make it 5-3 and scored when Headley lined a two-out shot off the Monster in the leftfield corner.

It was time for the deepest bullpen in the division -- and maybe the entire league -- to take over.

Adam Warren took the baton from Eovaldi and, after allowing a double by Hanley Ramirez and an RBI single by Victorino, passed it along to Justin Wilson. Dellin Betances has a wobbly but effective outing before giving way to Miller.

Not many teams can withstand starters lasting only five or six innings a night, but the Yankees have mostly flourished in those situations this year.

"They're a huge reason we're sitting in the position we're sitting in," McCann said of the bullpen. "We've got a lot of good arms down there. I feel like it's deep; from 1-7, you're getting quality arms."

The Yankees have their flaws -- they continue to play sloppy defense and the rotation is pockmarked with question marks -- but they clearly are the most complete team in a mediocre division.

"That's a nice series win," said Girardi, whose club closed the first half with three straight series wins. "It's big today, but obviously there's a lot of baseball to be played. It's nice to win a series, but there's a lot left to be done."