SAN FRANCISCO (AP) - Alberto Gonzalez hit a go-ahead single in the ninth inning, Kyle Blanks had a two-run homer and the San Diego Padres beat the San Francisco Giants 7-5 on Tuesday night for their season-best fifth straight victory.
Nick Hundley doubled against Ramon Ramirez (2-2) to start the ninth, then Logan Forsythe sacrificed him to third before Gonzalez singled up the middle. Will Venable followed with a run-scoring single.
Erik Hamren (1-0) retired pinch-hitter Miguel Tejada on a lineout to end the Giants' three-run eighth for his first major league win. Heath Bell finished for his 35th save in 39 opportunities.
The reigning World Series champion Giants fell two games behind the first-place Diamondbacks in the NL West after Arizona won at Washington.
Mat Latos didn't allow a hit until the fifth inning, but the Padres' bullpen couldn't hold a three-run lead.
Recent call-up Hector Sanchez singled in the eighth for his first major league hit and RBI, then Orlando Cabrera followed with a tying RBI single that chased Luke Gregerson.
But pinch-hitter Carlos Beltran popped out to end the eighth a few hours after he was activated from the disabled list. He received a roaring ovation from the sellout crowd of 41,288 when he stepped into the batter's box.
Jesus Guzman and Cameron Maybin each hit an RBI single for the Padres, who kicked off an eight-game road trip and a stretch with 30 straight games against division foes.
Blanks' second-inning drive was the first home run allowed by Matt Cain in 13 starts since June 14 at Arizona.
The Giants, back in their ballpark by the bay for a season-long 12-game homestand, also hurt their cause with three errors. San Diego overcame two blunders of its own.
Chris Stewart broke up Latos' no-hit bid with a bloop single to center leading off the fifth.
Latos allowed only Cody Ross' two-out walk in the second before running into trouble in the fourth. The right-hander retired the first two batters, then walked the bases loaded for Aaron Rowand, but he grounded out. Ross hit an RBI double in the eighth.
After Maybin's third-inning RBI single, Cain retired the next 10 batters in order before giving up a leadoff single to Orlando Hudson in the seventh.
Hudson fouled a ball off his right foot in the eighth and fell to the ground, writhing in pain. He walked it off and drew a walk on the next pitch from Steve Edlefsen.
The Giants scored two in the sixth, getting a break on Guzman's gaffe at first base. Guzman fielded Brandon Belt's sharp grounder, held onto the ball trying to freeze the runner and then opted to throw home rather than make the routine out at first. His throw was wild and well up the third-base line for a two-run error.
Cain was charged with an error when he apparently missed the bag while covering first on Hudson's grounder leading off the second. Blanks then homered on an 0-2 pitch.
The three errors matched San Francisco's season high and gave the Giants 92 on the season.
Things aren't going well for the defending champs.
San Francisco placed five players on the disabled list during its recent 4-6 road trip and six others missed time with injuries.
The Giants added to that list Tuesday but also got some good news with Beltran's return from a strained right hand and wrist. The switch-hitter hopes to start Wednesday night.
San Francisco put left-handed starter Jonathan Sanchez on the 15-day DL with a sprained left ankle. Outfielder Nate Schierholtz was in a walking boot for a broken bone in his right foot. There was no timeline for when he might play again.
There was another scare early when first baseman Aubrey Huff tried to chased down Guzman's ball in foul territory and right fielder Ross charged in, slid low and took Huff down. Huff was slow getting up but stayed in the game.
NOTES: Blanks has hit safely in 14 of his last 18 games since Aug. 5 - getting six homers and 18 RBIs in that span. ... Cain committed his third error of the season, matching the most of his career, also done in 2006. ... Maybin, San Diego's CF who wears No. 24 like Hall of Famer Willie Mays, got to meet the Say Hey Kid at his Bay Area home Tuesday. ... The Giants committed only 73 errors in 2010. ... RHP Tim Lincecum (11-10) pitches Wednesday night for the Giants looking for his third win in four starts this season vs. San Diego. He is 7-4 with a 2.16 ERA lifetime in 16 career starts against the Padres. ... Tim Stauffer (8-9) takes the mound for San Diego looking to improve on his 3-5 road record.