Tony Gwynn drove in the go-ahead run with a sacrifice fly in a three-run sixth inning and the Padres beat the wild card-leading Rockies 7-3 on Sunday.
The Rockies open a three-game series in San Francisco on Monday against the Giants, who pulled to 4½ games back in the wild-card race after beating the Dodgers.
"I think that where we are going, it's probably the best thing in the world for us," Rockies manager Jim Tracy said. "To get into that environment and realize that we're staring at the people that have a chance to track you down and go get them."
The Rockies remained three games behind the Dodgers in the West with 18 games left to play.
"We get an opportunity to do some really good things over the course of the next few days," Tracy said. "I think you look at it as a positive."
Colorado carried a 3-2 lead into the bottom of the sixth when the Padres scored three runs. Jason Marquis (15-11) walked four batters in the inning, including one with the bases loaded.
"I didn't get an out when I needed to," Marquis said. "I'm disappointed I couldn't keep the game in check."
The Rockies are the latest division contender to be surprised by San Diego (64-79).
In three consecutive series, the Padres have taken two of three games from the Dodgers, San Francisco and Colorado.
"These are teams that are fighting to get in the playoffs," San Diego's Chase Headley said. "That's where we want to be. For us to get to that level, we have to beat those teams and get to that level."
Said Padres manager Bud Black: "We try and view this as a measuring stick of going up against these teams that are competing for a playoff spot, and our guys are responding."
Marquis, who was trying for his career-high 16th victory, gave up Adrian Gonzalez's leadoff double in the sixth, then walked Headley. Rookie Will Venable reached on a fielder's choice when Gonzalez got tagged out in a rundown on Venable's grounder. Rookie Drew Macias was walked intentionally to load the bases.
Nick Hundley's infield single to short brought in the tying run and Gwynn followed with a sacrifice fly to put San Diego ahead 4-3. Marquis then issued back-to-back walks to pinch-hitter Oscar Salazar and rookie Everth Cabrera to force in another run.
"I just got away from what I do best and that's sinking the ball on both sides of the plate," Marquis said. "I used my cutter a little too much today."
Colorado lost Saturday night 3-2 when Hundley drew a bases-loaded walk in the 10th inning off Franklin Morales.
Adam Russell (1-0) picked up the victory with one inning of scoreless relief as five San Diego pitchers combined on five-hitter.
Marquis allowed five runs on eight hits in 5 2/3 innings. The right-hander had won his two previous starts against San Diego this season, allowing only one run on 11 hits in 16 innings.
Venable hit a solo home run, his 11th, in the second before the Rockies came back with three runs in the fourth.
San Diego added a run in the fifth on an RBI single by pinch-hitter Edgar Gonzalez. Headley had a sacrifice fly in the seventh and a ninth-inning RBI single.
Richard lasted five innings, giving up three runs on three hits. The lefty walked three and tied his career high with eight strikeouts, including the last five batters he faced.
- San Diego has won 11 of its past 14 series since July 28 with a record of 27-17.
- Marquis was the first Colorado starter to allow more than three runs in the last seven games.
- Before pitching the ninth inning, San Diego's Luis Perdomo had appeared in 19 consecutive losses since May 16.