SAN FRANCISCO -- Right-hander Tim Hudson won his seventh consecutive home start this season, limiting the Washington Nationals to six hits in seven innings in the San Francisco Giants' 7-1 victory Thursday afternoon.

Avoiding their first sweep of the year and first-ever in a four-game series at AT&T Park, the Giants got three hits apiece from right fielder Hunter Pence and first baseman Michael Morse in a 13-hit attack against three Nationals pitchers.

Washington had won the first three games of the series, outscoring the Giants 17-5.

Morse scored runs after singles in two-run uprisings in the second and sixth innings that provided Hudson (7-2) more than ample run support.

The first-year Giant reclaimed the National League lead in ERA at 1.81, allowing only one unearned run. He walked two and struck out five.

It was the 10th time in 13 starts this season that Hudson has pitched at least seven innings and given up two or fewer runs. He has not lost since May 6.

Right-hander Blake Treinen (0-3) took the loss.

The Giants scored twice in the second inning against Treinen to gain a lead they never relinquished. Left fielder Tyler Colvin's triple scored Morse, who had singled, with the game's first run. Shortstop Brandon Crawford's run-scoring infield out made it 2-0.

The Nationals cut the deficit in half in the fourth on an RBI single by left fielder Ryan Zimmerman that scored first baseman Adam LaRoche.

Hudson escaped jams in the fifth and sixth innings thanks to stellar middle-infield defense, then got another two-run injection of run support in the last of the sixth.

Again. Morse was in the middle of the uprising. He and third baseman Pablo Sandoval both scored after leading off with consecutive singles against Nationals right-handed reliever Craig Stammen. Sandoval was awarded home plate on a balk by Stammen and Morse made it 4-1 on a pinch-single by Gregor Blanco.

Sandoval's sacrifice fly scored Pence, who had singled, in the seventh, increasing the San Francisco lead to 5-1.

The Giants busted the game open with a third two-run inning, this one in the eighth against Washington's third pitcher, right-hander Aaron Barrett. Pinch-hitter Hector Sanchez delivered the big blow, a two-run single.

The Giants outhit the Nationals 13-7 but went a sixth consecutive game without a home run. Colvin (triple, single) and Crawford (double, single) also had multiple-hit games for San Francisco.

Treinen was pulled after pitching five innings. Failing to win for a fourth consecutive start, he gave up two runs and five hits, walking three and striking out two.

Catcher Jose Lobaton had two of Washington's seven hits, both singles. The Nationals had no extra-base hits in the game.

NOTES: The Nationals have not lost a series at AT&T Park since 2010. ... Nationals LHP Gio Gonzalez (shoulder inflammation) was scheduled to make his second injury-rehab start at Class A Potomac on Thursday night. Washington is hoping to activate Gonzalez from the disabled list next week. ... Giants C Buster Posey was back behind the plate Thursday on the back half of a night-day sequence because he has become RHP Tim Hudson's personal catcher. Giants manager Bruce Bochy said Posey would not catch the opener of the Colorado series Friday night, which kicks off another night-day sequence. ... Giants RHP Santiago Casilla (strained right hamstring) was slated to throw one inning in his debut for Class A San Jose in an injury-rehab stint Thursday night. The Giants plan to pitch Casilla twice for San Jose before making a decision on whether to activate him next week. ... Nationals manager Matt Williams went 0-for-3 in his career against Hudson, striking out twice.