BOSTON — The surging New York Yankees completed their first three-game sweep at Fenway Park since 2001 with an 8-5 victory over the sagging Boston Red Sox on Sunday night.

Former Boston center fielder Jacoby Ellsbury reached base six straight times, with four singles in the first six innings, a hit-by-pitch and walk for New York (16-9). First baseman Mark Teixeira and left fielder Brett Gardner hit hefty home runs as the first-place Yankees increased their lead in the AL East to three games with their 10th win in the last 12 games.

The Red Sox, falling below .500 (12-13) for the first time this season, trailed 8-0 but scored five runs in a two-out rally in the sixth inning. They had the bases loaded with two out in the ninth before Andrew Miller got Yankees killer David Ortiz to fly to center.

Red Sox right-hander Joe Kelly (1-1) lasted 4 2/3 innings and got the loss.

Yankees right-hander Adam Warren (2-1) pitched a career-high 5 2/3 innings and was cruising with two out and nobody on in the sixth when four straight Red Sox reached — Ortiz doubled home a run and, after left fielder Hanley Ramirez was plunked with a pitch (and didn’t like it), third baseman Pablo Sandoval singled home the second run.

Esmil Rogers relieved and served up a three-run homer to slumping first baseman Mike Napoli, his second home run of the season. The next two batters reached — making it seven straight — before rookie catcher Blake Swihart struck out, the second out he made in the inning.

In the Yankees eighth, reliever Edward Mujica threw two pitches in tight on Ellsbury — and then he hit him, leading to warnings to both benches.

Right-hander David Carpenter needed one pitch to end the eighth inning on a Napoli double play and former Red Sox left-hander Miller survived the ninth. He walked two and an error by third baseman Chase Headley loaded the bases. He retired Ortiz on a 2-2 pitch.

Neither Miller nor bullpen mate Dellis Betances has allowed an earned run.

The Yankees, 13-3 since a 3-6 start, had swept a five-game series at Fenway in 2006 and also took a two-gamer in 2012, but capped this sweep Sunday with their ninth win in their last 12 tries at the old ballpark.

New York improved to 5-1 in a run of 17 straight games against fellow AL East teams.

Gardner finished 2-for-6 with two stolen bases and a nifty catch in the outfield, while Teixeira hit his ninth homer of the season. Catcher Brian McCann doubled home two runs and right fielder Carlos Beltran had two hits in the win.

Kelly’s fielding mistake may well have cost him two runs in the first. Ellsbury led off with a single and Gardner hit a comebacker. Perhaps rushing because of Gardner’s speed, Kelly threw wide to second and had to settle with one out. So, when the inning might have been over, Teixeira homered with two out, blasting one the other way that cleared the Monster seats in left-center.

The Yankees stranded a runner at second in the second but then scored three in a 38-pitch third inning. Ellsbury led off with another hit and took second on a one-out single by DH Alex Rodriguez. Teixeira popped out before McCann, who fouled off a pair of 3-2 pitches, ripped his double up the alley in right-center. Beltran then doubled McCann home.

Ellsbury’s third hit, a wild pitch, a two-out error by Napoli and Gardner’s steal of second put runners on second and third with two out before center fielder Mookie Betts ran down Rodriguez’s drive in left-center to keep it at 5-0.

Betts then became Boston’s first baserunner when he doubled to lead off the fourth. Ortiz walked with one out before Ramirez banged into a double play. The Red Sox challenged and won to leave the inning alive, but Sandoval grounded out on a 3-0 pitch.

NOTES: Rodriguez, reacting to GM Brian Cashman saying the club won’t pay him the $6 million bonus for catching Willie Mays on the all-time home run list, said, “Family Business. I’ve learned my lesson (about public spats). The old (A-Rod) is gone.” … Ortiz was upset signed Ortiz items were offered to the fan who caught Rodriguez’s 660th home run (the fan refused to give up the ball). “That is not OK with me at all,” Ortiz told The New York Daily News on Saturday. … Boston claimed INF Luis Jimenez off waivers from the Milwaukee Brewers, transferring C Ryan Hanigan from the 15- to the 60-day DL. Jimenez arrives Monday, when Boston opens a three-game home series against the Tampa Bay Rays. … RHP Anthony Varvaro, designated for assignment by the Red Sox, was claimed by the Chicago Cubs. … Lifelong Sox fan James Taylor unveiled his “Angels of Fenway” in a pregame press conference and also threw out the first ball and sang “America The Beautiful” in the seventh inning. … The Yankees open a three-game series at Toronto on Monday.