BOSTON — Noah Syndergaard pitched seven innings of three-hit ball and the New York Mets hit four homers on Friday night to cool off the Red Sox 8-0 and snap Boston’s four-game winning streak.

The Red Sox, who lead the majors with 101 victories, had their lead over the New York Yankees in the AL East reduced to 91/2 games.

Boston’s magic number to clinch its third straight division title remained at six.

Syndergaard (12-3) struck out six and walked three to lead the Mets to their fourth straight victory and sixth win in their last seven games. Jay Bruce hit a three-run homer in the third, Austin Jackson hit a two-run shot in the eighth, and Jeff McNeil and Amed Rosario had solo shots for New York.

The Red Sox only got one baserunner to third, in the third inning when Ian Kinsler singled and stole second, then Jackie Bradley Jr. walked and they pulled off an uncontested double steal. But Syndergaard struck out No. 9 hitter Blake Swihart to end the threat.

Bruce also had a run-scoring double in the first against Red Sox emergency starter William Cuevas, who was making his first major league start because Hector Velazquez got sick. Cuevas (0-1), who pitched for the Sea Dogs in 2015, allowed back-to-back doubles to Michael Conforto and Bruce in the first, and then left after giving up Rosario’s leadoff single in the third.

Robby Scott hit Conforto with one out and then gave up Bruce’s homer to right. McNeil made it 5-0 in the fourth and Jackson cleared the Green Monster and the billboards above it to give the Mets a 7-0 lead. One out later, Rosario also put one over the left-field wall to make it 8-0 and chase Tyler Thornburg.

NOTES: The Mets had an unwelcome visitor to their dugout in the fourth inning: a rat that sent the players scurrying away. … RHP Matt Barnes (left hip inflammation) threw off a mound for the first time since his injury. He last pitched Sept. 3. … Infielder Eduardo Nunez got the first of two scheduled games off, a day after an awkward stumble trying to beat a throw at first base.