Matt Cain pitched a four-hitter, Dave Roberts singled home a run in the eighth inning and the San Francisco Giants earned their first three-game home sweep of the season Thursday with a 1-0 win over the Washington Nationals.

Cain (6-8), the hard-throwing right-hander who's had his share of hard luck the past two seasons, retired his first 11 batters and didn't issue a walk for the first time this year. After going 0-2 in his previous three starts, he struck out four in an efficient, 113-pitch performance to boost his strikeout total to 130.

Cain's only other shutout came May 21, 2006, at Oakland. This was the Giants' seventh shutout this year and the 13th time Washington has been blanked, a major league high.

With his fourth career complete game, Cain became the first San Francisco pitcher to throw a shutout since Noah Lowry on Aug. 21, 2006, against Arizona. The Giants' last complete game was by Matt Morris on June 11 last year against Toronto.

Washington's Cristian Guzman doubled with one out in the ninth to put runners on second and third, and San Francisco manager Bruce Bochy paid Cain a visit on the mound but left him in to finish _ with NL saves leader Brian Wilson warming up in the bullpen.

Ryan Zimmerman flied out to right, and Randy Winn made a perfect throw home to catcher Bengie Molina to hold the runner at third. Cain then got Austin Kearns to fly out to right to end it.

San Francisco took all seven games from the Nationals this year after sweeping a four-game set in Washington from June 6-9 _ just the third time since 1900 the franchise has swept a season series of more than three games.

The Giants have some momentum heading into a weekend series at home against the first-place Diamondbacks.

Zimmerman doubled with two outs in the fourth for Washington's first hit. Since returning Tuesday from a 48-game absence with a shoulder tear, Zimmerman is batting .417 (5-for-12) and owns a 12-game hitting streak dating to before his stint on the disabled list. Starting pitcher Tim Redding was the next base runner against Cain after he singled in the sixth.

Redding (7-5) held tough right along with Cain until giving up Steve Holm's leadoff single in the eighth. Eugenio Velez entered as a pinch runner and scored on Roberts' base hit up the middle.

Redding allowed seven hits in eight innings, struck out five and didn't walk a batter for the second time in three starts.

Bochy rested several regulars, including Molina, left fielder Fred Lewis and shortstop Omar Vizquel. Roberts started in left and batted leadoff, his first time in the lineup since going on the disabled list in late April following left knee surgery. The 36-year-old Roberts made a pretty, leaping catch that brought him to the ground, stealing a hit from Willie Harris in the sixth.

Guzman, who on Tuesday received a two-year contract extension worth $18 million, went 1-for-4 and has only two hits in his last 18 at-bats.

Notes:@ The Giants have been swept three times at home, by Oakland, the Chicago White Sox and Milwaukee. ... An MRI exam on INF Aaron Boone's injured left calf confirmed a strain that hasn't completely healed. He's been out since July 7. The exam was performed by Giants orthopedist Ken Akizuki, who recommended continued treatment and rest. ... Nationals manager Manny Acta said that when CF Lastings Milledge returns soon from a strained right groin, he'll likely bat fifth or sixth. ... Home run king Barry Bonds was nowhere to be seen in these parts on his 44th birthday.