SAN FRANCISCO (AP) - The momentum shifted in a matter of moments, a sellout crowd going all out against San Diego.
The San Francisco Giants tied the game with a three-run eighth inning, then the Padres came right back with the big hits they needed to win in the ninth.
Alberto Gonzalez hit a go-ahead single in the ninth inning, Kyle Blanks had a two-run homer and the Padres beat the reeling World Series champions 7-5 on Tuesday night for their season-best fifth straight victory.
``The Giants are defending world champs, so for a team like us to play a game like this where young kids didn't give up one bit shows a lot of character for us,' closer Heath Bell said.
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. After a wild pitch, Will Venable added 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. Bell finished for his 35th save in 39 opportunities.
The 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.
``We gave up the three in the (eighth), but in the dugout there was still positive energy,' Padres manager Bud Black said. ``That was a huge momentum shift to the Giants and we got it back.'
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 hairline fracture in his right foot. Schierholtz is going to try to play through it after a couple of days of rest.
In the first, Aubrey Huff tried to chase 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.
``I really consider ourselves fortunate nobody got hurt,' Giants manager Bruce Bochy said. ``It's amazing: What can go wrong is going wrong right now. We didn't catch that ball and they scored a run.'
NOTES: Blanks has hit safely in 14 of his last 18 games since Aug. 5 - getting six homers and 18 RBIs in that span. ... 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. ... 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.
Copyright 2017 by STATS LLC and Associated Press.
Any commercial use or distribution without the express written
consent of STATS LLC and Associated Press is strictly prohibited.