Tim Hudson threw seven strong innings and left with a major league-best 1.81 ERA as the San Francisco Giants avoided a four-game sweep, beating the Washington Nationals 7-1 on Thursday.