Jordan Pacheco drove in the winning run in the 12th inning as the Rockies dropped the Padres, 8-6, in the middle installment of a three-game series.
Pacheco picked up three hits on the night and drove in four runs for Colorado, which snapped a three-game losing streak.
"That was a well played baseball game on both sides of the field," Rockies manager Jim Tracy said. "We did a nice job of coming back offensively."
Josh Rutledge, who was called up following the All-Star break, picked up two hits and drove in a run. The 23-year-old shortstop has picked up multiple hits in four of his first eight games in the big leagues.
Joe Thatcher (0-3) took the loss after surrendering a pair of runs on three hits in the 12th inning.
Chase Headley knocked in a pair of runs as the Padres saw their four-game winning streak come to an end.
"One of those games," Padres manager Bud Black said. "A lot of close calls on both sides."
Michael Cuddyer started the rally in the 12th inning with a one-out single and advanced to second on a sacrifice bunt. Pacheco then drove a single through the hole on the left side and Cuddyer just beat the throw home. On the throw, Pacheco advanced to second and scored when Ramon Hernandez dropped a single into center field.
The Padres jumped over starter Jeff Francis early, scoring three runs across the first two innings of the game.
After Chris Denorfia and Logan Forsythe led off the first with a pair of hits, Headley singled up the middle to give the Padres a two-run lead.
Jesus Guzman made it 3-0 when he hit a solo home run in the second by lofting a long fly ball that just reached the first row of seats in left field.
The Rockies stormed back with four runs in the fourth inning off Padres starter Kip Wells.
Carlos Gonzalez reached base on an error by Forsythe before Cuddyer worked a walk. Tyler Colvin singled to load the bases and Pacheco singled up the middle to plate a pair. Hernandez and Rutledge delivered back-to-back base hits to plate two more and give the Rockies the lead, 4-3.
Colorado added two more runs in the fifth inning with a two-out rally. Cuddyer delivered a double and then came around to score on a base hit by Colvin. Pacheco lined a double to left to plate Colvin and make it 6-3.
San Diego put two on the board in the bottom half of the fifth after Guzman led off with a triple. Everth Cabrera doubled to score Guzman and then crossed home when Denorfia slapped a single through the right side.
The Padres put together a two-out rally to tie the game in the eighth inning. With stellar set-up man Matt Belisle on the hill, Carlos Quentin dropped a double into the right-field corner. Yasmani Grandal then stroked a single to left to score pinch-runner Cameron Maybin and tie the game.
San Diego had a chance to win the game in the ninth inning, but Colvin made a diving catch down the right-field line and doubled up the runner at second base to end the threat.
With Dexter Fowler on second base with two outs in the 11th inning, Marco Scutaro hit a fly ball down the right-field line, but Will Venable returned the favor and made a diving catch to give San Diego another opportunity.
Rafael Betancourt retired the Padres in order in the 12th to pick up his 16th save. Carlos Torres (1-0) picked up the win after tossing two scoreless innings.
Francis allowed five runs on eight hits in five innings. He now has a 5.54 earned run average in 24 starts against the Padres (82 earned runs in 133 2/3 innings)...Despite tossing seven scoreless innings against the Rockies on July 1, Wells was tagged for six runs -- five earned -- on eight hits and a walk in 4 2/3 innings...Padres pitcher Huston Street tossed a scoreless inning of relief and has not allowed a run in 12 2/3 innings...Cabrera stole a base and is now a perfect 18-for-18 on the season, a club record to start a season...Colorado went 7-for-14 with runners in scoring position and stranded nine...San Diego went 4-for-7 with runners in scoring position and left four on base.