Carlos Beltran cracked a first inning, three-run blast and Brian McCann added a two-run shot in the sixth as the Yankees shut out the Mets 5-0 in second game of their subway series.

Both homers came off rookie Noah Syndergaard, who struck out eight but was tagged for seven hits as he fell to 8-7.

Michael Pineda (11-8) gave up just four hits over 5 and 1/3 innings, and the Yankee bullpen was equally as good from there. The Mets biggest threat came in the sixth, opening the inning with back to back singles. Pineda then struck out Yoenis Cespedes, the final batter he faced in the game. From there, reliever Justin Wilson walked Daniel Murphy, but ended the inning with two big strikeouts of David Wright and Juan Uribe.

The Mets' NL East lead fell to games 7 games with 14 to play.

The Yankees hold the AL's top wild card spot and moved to within 3.5 games of Toronto in the division.

Matt Harvey (12-7) and C.C. Sabthia are scheduled to start the rubber match on ESPN Sunday Night Baseball.