San Francisco, CA (Sports Network) - Ian Desmond's RBI single in the top of the 10th inning sent Washington past San Francisco, 2-1, in the finale of a three-game set.
Bryce Harper's sixth-inning homer was the only other offense for the Nationals, who avoided a sweep and put the brakes on a four-game skid.
Tyler Clippard (3-1) tossed a scoreless ninth for the win and Rafael Soriano followed suit in the bottom of the 10th for his 13th save.
Buster Posey knocked in the lone run and Andres Torres doubled twice for the Giants, who have dropped four of their last six.
Jeremy Affeldt (1-1) was charged in defeat with the deciding run.