BOSTON — Hanley Ramirez homered twice and drove in four runs to rally the Boston Red Sox over New York on Sunday night, completing a four-game sweep that severely diminished the Yankees’ chances of winning the AL East.

Jackie Bradley Jr. had a tying RBI single for the East-leading Red Sox, who overcame a rough start by Drew Pomeranz to post their ninth win in 12 games. Boston remained three games ahead of second-place Baltimore, which beat Tampa Bay 2-1 on Sunday.

The Red Sox open a 10-game trip at Baltimore with the first of four games on Monday night.

Gary Sanchez belted his 16th homer since Aug. 3 for the Yankees, who dropped eight back in the division and remained four behind Toronto for the second wild-card spot.

The Yankees were without second baseman Starlin Castro and center fielder Jacoby Ellsbury, who were both injured Saturday. Castro strained his right hamstring running out a double and Ellsbury bruised his right knee sliding into a bullpen wall trying to make a catch.

The Red Sox overcame deficits three times in the series, including the opener, when they scored five in the ninth and Ramirez hit a game-ending, three-run homer.

Advertisement

This time, he hit a fly ball that soared over the Green Monster off Tyler Clippard (1-1) for a 5-4 lead in the seventh. It was his 12th homer in 21 games.

Robby Scott (1-0) retired the only two batters he faced for his first major league victory.

Koji Uehara got the final three outs for his seventh save.

New York scored single runs in the first and third before chasing Pomeranz with two in the fourth.