Marco Scutaro's fielding error allowed the winning run to score in the bottom of the 12th inning, as the San Diego Padres picked up an 8-7 victory over the San Francisco Giants in the middle installment of a three-game set at Petco Park.
Yonder Alonso smacked a one-out double to start the rally before Jedd Gyorko singled to right to put runners on the corners.
Nick Hundley then followed with a sharp grounder to second that Scutaro was unable to handle, allowing Alonso to race home for the winning run.
"Wins like this give you life. They give you an opportunity to build some momentum," Alonso said.
Joe Thatcher (1-0) stranded runners on second and third in the top of the 12th to earn the victory. San Diego starter Eric Stults allowed five runs on four hits over four frames.
Alonso finished with three doubles, two RBI and two runs scored, while Chris Denorfia also plated a pair for the Padres, who have won three straight on the heels of a five-game skid.
Brandon Crawford clubbed a three-run homer and Hunter Pence added a two-run triple for the Giants, who have dropped four straight.
Sergio Romo (1-2) was tagged with the loss after giving up the deciding run in the 12th. Barry Zito made the start for San Francisco and gave up six runs -- one earned -- on six hits over 3 2/3 innings.
"He just couldn't get the last out in the fourth," Giants manager Bruce Bochy said. "He was cruising until then."
Crawford's blast came with two outs in the second, as he launched a first- pitch slider over the right-field wall for a 3-0 lead.
Pablo Sandoval and Buster Posey each doubled home a run in the third to push the lead to 5-0, but the Padres plated six runs in the fourth to jump in front.
Carlos Quentin reached second on Andres Torres' fielding error before Kyle Blanks followed with a single to left. Alonso then scored both runners with a double to center to make it 5-2.
After Hundley worked a two-out walk, pinch-hitter Jesus Guzman smacked an RBI single and Denorfia followed with a two-run double to left to chase Zito.
Chad Gaudin took over on the mound and served up a run-scoring single to Everth Cabrera to give the Padres a 6-5 lead.
Pence's two-run triple in the fifth quickly put the Giants back in front, but Blanks tied the game in the seventh when he scorched a one-out single back up the middle to score Chase Headley, who doubled to start the inning before moving to third on Quentin's fly out.
The Giants went 3-for-7 with runners in scoring position after going 0-for-15 over their last two games ... The Giants have dropped five straight on the road for the first time since May 19-23, 2010 ... Posey extended his hitting streak to eight games ... The Padres committed two errors to snap a string of 11 straight games without a defensive miscue, which was a club record.