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

Chase Utley
Chase Utley (Hunter Martin/Getty Images)
loading...

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.

Utley, Marlon Byrd and Wil Nieves had a pair of hits for Philadelphia, which snapped its four-game losing streak while winning for just the second time in nine games.

Jonathan Papelbon pitched a scoreless ninth for his 24th save in 27 opportunities to stop a rocky stretch. Papelbon blew his third save in Tuesday's 9-6, 14-inning defeat and took the loss in Wednesday's 3-1 loss.

He was booed upon entering the field and then again when he was introduced by PA announcer Dan Baker.

Papelbon pitched a 1-2-3 inning to tie Goose Gossage for 21st place on the all-time save list with career save No. 310.

Philadelphia slugger Ryan Howard wasn't in the lineup for the second straight day as manager Ryne Sandberg has decided to look elsewhere to find production from first base. Howard has been in a power drought with just one homer since June 19 and his .224 average, .377 slugging percentage and .682 on-base plus slugging mark are well off his usual production.

The move was eye-opening considering the three-time All-Star and former MVP's dominance against Hudson, against whom he has batted .328 with seven homers and 17 RBIs in 67 career at-bats.

Howard's replacement, Darin Ruf, went 1-for-4 with a strikeout.

The Phillies got some help on both of their runs off of Hudson.

In the first, Jimmy Rollins hit a one-out double, went to third on a passed ball and scored on Byrd's single to left.

San Francisco tied the game in the fifth on Ehire Adrianza's RBI single to center.

Philadelphia got some more good fortune in the bottom of the frame as Ben Revere opened the inning with a medium flyball to left. Michael Morse charged hard but couldn't come up with the grab and the error allowed Revere to reach second. Revere scored on Utley's single to center.

Hamels went at least seven innings for the 13th time in the last 15 starts and gave up three runs or less for the 11th consecutive outing. The left-hander reached double-digits in strikeouts for the fourth time this season and 27th in his career.

Hamels cooled off Hunter Pence, who went 0 for 4 with three strikeouts. Pence entered batting .412 with a homer and six RBIs in the series, including the game-winning double in Wednesday's 3-1 Giants victory.

Phillies catcher Will Nieves came up limping after moving awkwardly to block a fourth-inning pitch to Adam Duvall but stayed in the game. Nieves was activated Monday after spending a month on the DL with a strained right quad.

NOTES: The Giants open a pivotal three-game series at home against the rival Dodgers on Friday with San Francisco right-hander Tim Lincecum (9-6, 3.68) opposing Los Angeles right-hander Zack Greinke (11-6, 2.90). . Philadelphia hosts Arizona for a three-game set that begins Friday when Diamondbacks lefty Wade Miley (6-6, 4.16) takes on Phillies right-hander Kyle Kendrick (4-10, 4.87). . The Giants last swept a four-game series against the Phillies Aug. 30-Sept. 2, 1999, and last did it in Philadelphia July 31-Aug. 3, 1998. . The Giants entered an NL-best 29-19 on the road.

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

More From New Jersey 101.5 FM