Josh Bell hit the only home run on Barry Bonds jersey retirement night in San Francisco, a three-run shot in the fourth inning that propelled the Pittsburgh Pirates to a 4-0 victory over the San Francisco Giants on Saturday.

Trevor Williams (10-8) continued his brilliant pitching with seven innings of five-hit ball, helping the Pirates clinch the season series over the Giants with a fourth win in six games.

Bell's homer, his second of the series and eighth of the season, came after Gregory Polanco had bunted for a hit and David Freese had reached on an infield single to open the fourth inning of a game the Pirates led 1-0.

One out later, Bell smacked a Ty Blach pitch over the fence in left field for the big blow of the game.

The Pirates had scored first on a sacrifice fly by Corey Dickerson in the third inning, scoring Josh Harrison, who had led off the inning with a walk.

Facing a Giants team that had scored 13 runs the night before, Williams allowed just one baserunner past first base in his seven innings. He walked one and struck out two.

Williams has now given up just two runs in his last 29 innings over five starts, going 4-1 in that stretch.

Keone Kela worked a 1-2-3 eighth inning, before Felipe Vazquez closed out the Giants in the ninth by getting Brandon Crawford to ground into a double play after Evan Longoria had singled with one out.

The Giants finished with six hits, all singles.

Blach (6-7) took the loss after giving up four runs and four hits in four innings. He walked two and struck out five.

Casey Kelly, considered for the start before the Giants chose to promote Blach from the bullpen, blanked the Pirates on two hits over the final five innings, striking out three, in his San Francisco debut.

Elias Diaz had two hits for the Pirates, who improved to 4-2 on their nine-game trip.

Longoria and Buster Posey stroked two singles apiece for the Giants, who lost for the fourth time in their last five games.

The Giants retired Bonds' No. 25 prior to the game with a ceremony that included appearances from Willie Mays, Willie McCovey and Dusty Baker. The ceremony included in-stadium speeches and video tributes to the all-time home run king.

--Field Level Media