Updated

Brett Pill belted a two-run homer in his bat and Carlos Beltran went 3-for-4 with three RBI in 4 victory over the San Diego Padres.

The Giants, who have won the first two contests of this three-game set, are six games behind the NL West-leading Diamondbacks. Arizona lost to Colorado Tuesday night.

Left-hander Eric Surkamp (1-0), who was recalled from the minors to make his second major league start, allowed five hits and three runs over five innings to record his first win.

"It's awesome to think they believe in you and they have confidence in you," Surkamp said.

The Giants won their first series since August 12-14 at Florida. They had posted a 1-8-2 record in their last 11 series and were 0-4-2 in their last six sets before taking this one.

Santiago Casilla struggled in the ninth inning, allowing a pinch-hit RBI double to Anthony Rizzo. He then hit Cameron Maybin and Jason Bartlett before Giants manager Bruce Bochy summoned Ramon Ramirez from the bullpen. He fanned Jesus Guzman to end the game and notched his fourth save.

Nick Hundley homered for the Padres, losers in 11 of their last 12 games.

Wade LeBlanc (2-5) allowed eight hits and four runs over five innings to take the loss.

"We're playing hard, the results just aren't happening in the win column," Padres manager Bud Black said.

Mark DeRosa singled to start the second. Pill, a first baseman, then homered off the facade of the Western Metal Building beyond left field. He is the first Giants player to homer in his first major league at-bat since first baseman Will Clark on April 8, 1986 against Houston's Nolan Ryan.

Hundley's homer and Andy Parrino's sacrifice fly in the second tied the game, and the teams exchanged runs in the third, on a Beltran single and sac fly from Kyle Blanks.

The Giants went ahead for good in the fifth. Center fielder Justin Christian, who was called up from Triple-A Fresno and was in his first major league game since 2008 when he played for the Yankees, doubled to lead off. Beltran then doubled to the left field corner with one out for a 4-3 margin.

Orlando Cabrera singled in Beltran in the eighth and Beltran's groundout, off the glove of first baseman Jesus Guzman, plated Pablo Sandoval in the ninth.

Game Notes

Beltran has collected three-or-more hits in three of four games this month, going 11-for-15 so far in September...Sandoval has hit safely in 12 of 14 games against the Padres this year, batting .358 vs. San Diego...This is just the third time in San Francisco history a player has homered in his first big league plate appearance with Johnnie LeMaster also doing so on September 2, 1975 vs. the Dodgers...The Giants have won nine of 14 meetings with San Diego this season.