WASHINGTON -- Livan Hernandez gave the New York Mets everything he had before leaving with an upset stomach.
It was enough to end a difficult road trip on a positive note.
Hernandez allowed four singles over seven innings and the Mets scored five first-inning runs in a 7-0 victory over the Washington Nationals on Sunday.
New York went 2-4 on its six-game trip, getting swept in Pittsburgh before taking two of three from the woeful Nationals. The Mets open a three-game series against NL East-leading Philadelphia on Tuesday at Citi Field.
Hernandez (5-1) walked four and struck out four to win for the fifth time in seven starts, departing after 116 pitches. The right-hander has won seven consecutive games against the Nationals and improved to 10-5 lifetime against his former team.
"Obviously we need good pitching, and that's outstanding pitching," Mets manager Jerry Manuel said, adding he was surprised when Hernandez begged out because he was ill. "That's not normal for Livo. He can throw 160, 170 pitches and not flinch, but you know he's battling some different things when he comes in and says that."
Hernandez had enough confidence in the Mets bullpen not to try and gut it out when he felt bad. Pedro Feliciano and Bobby Parnell combined to pitch the eighth and Francisco Rodriguez finished the five-hitter, completing New York's third shutout.
"I want to go seven innings and that's it," Hernandez said. "The relievers came in and made two innings and that's it. I think it's good for me today."
Washington lost for the 10th time in 12 games and dropped to 2-7 against the Mets this season.
The Mets, limited to four runs in splitting the first two games of the weekend series, took advantage of Craig Stammen's wildness in the first to build a 5-0 lead.
In 55 games, the Mets have scored 49 runs in their first at-bat, the second-highest total in the National League. New York's first-inning batting average is a lofty .342 (77-for-225).
"That's what we need to do is jump on teams early -- which we've done all year -- but also add one or two here and there when we have the opportunity," third baseman David Wright said. "We did that today."
Alex Cora led off the game with a four-pitch walk and scored on Fernando Martinez's double over the head of center fielder Elijah Dukes. Martinez went to third on Carlos Beltran's groundout and Wright walked. Martinez scored on a wild pitch as Wright stole second and Daniel Murphy's RBI single made it 3-0.
Murphy advanced on Ryan Church's double and scored on Brian Schneider's sacrifice fly. Stammen then uncorked another run-scoring wild pitch to cap New York's big first.
"When you're a contact-pitcher type of guy, you can't pitch behind in the count. That's all [Stammen] did in that first inning," Nationals manager Manny Acta said. "He's got to pitch ahead because he's not a miss-bat type of guy."
Stammen (0-2) blanked the Mets over the next four innings, but the damage was done. The rookie right-hander gave up six hits, walked two and struck out two.
"I got behind some people and then left the ball up a little bit and they got a hold of some pitches," Stammen said.
Wright added a two-out RBI single in the seventh and Beltran doubled in a run in the ninth.
Washington finished with four wild pitches. ... Nationals LHP Scott Olsen, on the 15-day disabled list with left shoulder tendinitis since May 18, will make a rehabilitation start for Class A Potomac on Tuesday. Olsen will throw 50 pitches or three innings. ... Wright's first-inning steal was the 105th of his career and moved him into a ninth-place tie with Roger Cedeno on the Mets' career list. ... Nationals C Josh Bard drew a career-best three walks.