PHILADELPHIA (AP) -- Cole Hamels pitched eight strong innings and Chase Utley had an RBI single to lift the Philadelphia Phillies to a 2-1 victory over the San Francisco Giants on Thursday.

Cole Hamels of the Philadelphia Phillies looks in for the catcher's signs at Citizens Bank Park in Philadelphia. (Hunter Martin, Getty Images)

Hamels (5-5) got the better of Tim Hudson in a matchup between starters who have combined for seven All-Star appearances. The Philadelphia left-hander gave up six hits while striking out 10 and walking one.

Hudson (8-7) gave up two runs in six innings although both were unearned. The right-hander struck out six and walked two.

The Giants, who were looking for their first four-game sweep in Philadelphia since 1998, lost for just the second time in eight games. San Francisco's lead over the idle Dodgers in the NL West dropped to 1 1/2 games entering this weekend's three-game series between the rivals at AT&T Park.

(Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)