SAN FRANCISCO -- Jayson Werth hit his first homer in almost a month and drove in three runs, and the Washington Nationals capitalized on Matt Cain's erratic start to beat the San Francisco Giants 6-2 on Wednesday night for their fourth straight win.
Cain (1-4) walked the first three batters he faced before Adam LaRoche's two-run single highlighted a three-run first inning. Werth's solo shot in the fifth and two-run single in the ninth provided the rest of the pop for the Nationals, who have won 10 of 12, including the last three at San Francisco.
Tanner Roark (5-4) allowed two runs and seven hits in six-plus innings for Washington. He struck out four and walked none.
Brandon Crawford and Pablo Sandoval each drove in a run for the Giants, who have lost a season-high tying three straight after winning five in a row to take over baseball's best record.
Cain's struggles might have been the most disappointing thing of all for the Giants.
In his second start since a stint on the disabled list with a strained right hamstring, the former ace reverted back to his early season woes against Washington. Cain gave up four runs and three hits in five innings, walking five and striking out four.
The finale of the four-game series is Thursday, but the NL East-leading Nationals already have handed San Francisco its first series loss since the Giants were swept at Pittsburgh from May 5-7. The Giants had not lost two in a row since May 16-17 to the Marlins until the Nationals showed up in San Francisco this week.
Even with standouts Bryce Harper and Gio Gonzalez on the disabled list, Washington is surging up the standings thanks to a consistent approach at the plate, on the mound and in the field.
Roark worked fast and attacked hitters, and Washington's defense did the rest.
After Crawford's RBI triple in the fourth, second baseman Danny Espinosa made a diving stop on Gregor Blanco's sharp grounder and threw out the speedy runner at first. Ryan Zimmerman also swiped another run from San Francisco in the sixth, when the former third baseman made a diving catch of Crawford's fly to left after Michael Morse doubled.
Sandoval, scratched from the starting lineup because of an illness, singled home a run as a pinch-hitter in the seventh to whittle Washington's lead to 4-2. Zimmerman, filling in for Harper in left, slid in to snag Angel Pagan's short fly for the third out.
With his back right leg almost touching the dirt, Werth went low to launch his sixth homer of the season to put the Nationals up 4-1 in the fifth. Werth, who had not homered since May 14 at Arizona, singled with two outs in the ninth off Yusmeiro Petit to extend Washington's lead to 6-2.
Drew Storen, Tyler Clippard and Jerry Blevins each tossed a scoreless inning to help Washington finished off San Francisco again.
NOTES: The Nationals placed catcher Wilson Ramos on the 15-day disabled list with a strained right hamstring and called up catcher Sandy Leon from Triple-A Syracuse. ... The Giants traded left-hander David Huff back to the Yankees for cash. He was sent to San Francisco in January for cash after the Yankees signed Masahiro Tanaka. ... Tim Hudson (6-2, 1.97 ERA) takes the mound for the Giants opposite Washington's Blake Treinen (0-2, 1.78 ERA) in Thursday's series finale.