The Yankees' Aaron Judge celebrates with teammates in the dugout after hitting a home run during the fifth inning against the Boston Red Sox at Fenway Park on Sunday night.

Gleyber Torres and Mike Tauchman each slugged two-run home runs to power the visiting New York Yankees past the Boston Red Sox 10-5 on Sunday night.

Torres had three hits and four RBIs, and Aaron Judge also went deep as the Yankees set a club record for homers in a season at 268, surpassing the 267 they hit last year. New York won for the 11th time in its last 15 games and will seek a series victory in the finale of the four-game set Monday night.

Jackie Bradley Jr. and Mookie Betts homered for the Red Sox, who fell to the Yankees for the 13th time in 18 meetings this season and suffered another setback to their slim playoff chances. Boston has dropped five of its last eight and is eight games behind the Oakland A's for the second AL wild-card berth.

Betts' leadoff blast in the eighth inning got the Red Sox within 8-5, but the Yankees scored two in the ninth to put the game away. Third baseman Rafael Devers was charged with two errors in the inning and three for the game.

Torres' team-leading 35th homer in the second gave New York a 2-0 lead, and the Yankees increased the margin to 4-0 with a pair of runs in the third.

Bradley got the Red Sox on the board with his two-run blast in the bottom of the third, but New York went up 6-2 when Tauchman went yard in the fourth. The left fielder would exit the game in the bottom of the frame with tightness in his left calf sustained fielding a single; Cameron Maybin replaced him.

Despite the early offense, Yankees starter Masahiro Tanaka was pulled after four innings after the Red Sox got within 6-4 on back-to-back RBI doubles by Mitch Moreland and Sandy Leon in the fourth. Tanaka gave up four runs on eight hits and struck out two.

Chad Green (3-4) took over and earned the win, striking out five over three perfect innings, including whiffing the side in the seventh.

Red Sox starter Rick Porcello (12-12) suffered the loss, giving up six runs on seven hits over four innings and striking out one.

Judge's solo blast and a run-scoring Torres forceout put New York up 8-4 in the fifth.