BOSTON – Wade Miley put in his longest performance with the Boston Red Sox, but the offense could not back him up as the New York Yankees topped Boston 4-2 Saturday afternoon at Fenway Park.

Miley gave up three runs over seven innings in his fifth start. He had totaled 15 2/3 innings in his four previous starts.

Brett Gardner’s two-out, two-run single in the fifth gave the Yankees a 3-1 lead.

Boston got its first run on Dustin Pedroia’s fifth home run of the season, a shot over the Green Monster in the fourth.

Mookie Betts doubled in Blake Swihart in the seventh inning for Boston’s other run.

Swihart, who was catching for the Portland Sea Dogs last year, was called up Saturday to replace Ryan Hanigan, who went on the disabled list after breaking a finger in his right hand Friday night.

Swihart struck out in his first major league at-bat, in the third inning. He beat out a grounder to second in the fifth for his first hit.

In the seventh, Swihart drew a two-out walk against starter Nathan Eovaldi (2-0).

Chris Martin, another former Sea Dogs players, relieved Eovaldi.

Betts, who was Swihart’s teammate in Portland last year, greeted Martin with a double off the Monster, closing the score to 3-2.

New York got insurance when Chris Young homered off of Alexi Ogando in the ninth.

Yankees reliever Delin Betances struck out Swihart to end the game.

Boston dropped to 12-12, falling three games behind the first place Yankees (15-9).