SAN FRANCISCO (AP) -- The Washington Nationals left San Francisco feeling pretty good about themselves despite enduring their worst loss in more than a month.
That's because the Nationals, who lost Thursday's game 7-1 to the Giants, won the first three games of the series against the team with the best record in baseball.
"It's gratifying to play as well as we did in the first three," Washington manager Matt Williams said. "Today it kind of unraveled on us. To take three of four from these guys is pretty good."
Blake Treinen (0-3) remained winless at the major league level despite a 2.08 ERA. He gave up two runs and five hits in five innings.
Treinen, who replaced the injured Gio Gonzalez in the starting rotation, has pitched against tough competition. The four starters he's faced have combined for 14 opening day assignments.
"He's done well and is working hard at every aspect of the game," Williams said. "He has that power slider, which is his go-to pitch. Working on the development of his other pitches is what is important."
Treinen worked out of a bases-loaded, no-out situation in the fourth. A single and two walks put him in a dangerous situation. He struck out Ehire Adrianza and got Hudson to hit into a double play.
"I was happy to get out of that mess of an inning I got us in," Treinen said. "The strikeout was huge for me. With Hudson, I like my chances of getting the ground ball. It worked out."
The loss was the first by more than three runs since May 11, when the Nationals dropped a 9-1 decision to the Oakland Athletics in another getaway day.
Hudson (7-2) threw seven strong innings and left with a major league-best 1.81 ERA. He allowed one unearned run and six hits. He walked two, struck out five and improved to 3-0 in his last five starts, which includes a suspended game.
"I'm confident I can compete at this level," Treinen said. "But I still need to improve, especially the command of my fastball."
Ryan Zimmerman drove in a run for the Nationals. Jose Lobaton, making his third consecutive start behind the plate, added two hits.
Hudson allowed two or fewer runs for the 10th time in 13 starts. He beat the Nationals for the 17th time, the most of any active player, in 30 starts.
"He just induces groundballs," said Williams, who struck out twice in three career at-bats against Hudson. "It seems like he never gets a ball up. That was pretty typical."
NOTES: Gonzalez was scheduled to make one last rehab start Thursday before rejoining the team. ... Washington RHP Jordan Zimmermann (5-2, 3.17) starts at St. Louis on Friday night. He is 0-4 in seven starts against the Cardinals. . The Nationals ended a streak of 17 consecutive starts of allowing two walks or fewer.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.