WASHINGTON (AP) -- Tanner Roark pitched seven scoreless innings and Wilson Ramos homered in the seventh inning for the game's only run as the Washington Nationals beat the New York Mets 1-0 on Wednesday.With one out in the seventh, Ramos hit his 21st home run deep over the center-field wall on the first pitch from Fernando Salas (0-1). The Nationals have won five of six.Roark (15-8) allowed three hits with seven strikeouts and four walks, one intentional. Reliever Blake Treinen pitched the eighth and Mark Melancon got the final three outs for his 42 save.New York lost two of three in Washington to finish 6-3 on its nine-game road trip.Nationals manager Dusty Baker was not with the team in the series finale because of a death in the family. Bench coach Chris Speier managed team in Baker's absence.Roark is 1-2 with a 1.27 ERA in four appearances against the Mets this season including three starts. The right-hander threw at least seven shutouts innings for a major league-leading ninth time this season.The Mets had won eight of 10 and were 17-6 over their previous 23 games.Salas, who was 3-6 with the Angels, had not allowed a run in seven appearances since being acquired from Los Angeles on Aug. 31.Mets starter Robert Gsellman tossed 5 2/3 scoreless innings, allowing five hits with four walks.New York opened the game with back-to-back singles and loaded the bases with one out, but Roark escaped by striking out Jay Bruce and getting T.J. Rivera on a fly ball.Gsellman held the Nationals to one run for a 3-1 win in New York on September 3.Bryce Harper struck out looking against reliever Josh Smoker with two runners on to end the sixth and finished 0 for 2 with a walk. He was also thrown out stealing to end the fourth as part of a double play.Washington won the season series 12-7.Daniel Murphy's single in the first inning extended his hitting streak to 12 games overall and meant at least one hit in all 19 games against his former team this season.