DENVER -- After having their starters roughed up in the first two games of the series, the San Diego Padres needed someone to restore order. Jake Peavy was the stabilizing force.
Peavy pitched into the eighth inning and Dave Roberts drove in two runs with two triples as the Padres maintained their five-game lead in the NL West with a 5-2 victory over the Colorado Rockies on Wednesday night.
"We really needed a solid performance," San Diego manager Bruce Bochy said. "He was the guy we wanted out there and he came through for us and he pitched a good ballgame, the kind of effort we needed."
San Diego starters allowed 13 earned runs in 3 1/3 innings over the first two games of the series, including Colorado's 20-1 victory on Tuesday.
"Today was a must-win, it was the swing game, the pivotal game in the series," Bochy said. "If you lose tonight, then you have to come out to salvage the series tomorrow."
Second-place San Francisco defeated Washington 5-1 to stay five games out with 11 games to play.
Peavy (13-7) struck out four, walked three and gave up two runs and seven hits in winning for the first time in three starts. He only allowed a solo homer to Danny Ardoin and a two-out RBI single to Matt Holliday before departing with two outs in the eighth inning.
"You have to forget a game like last night and let it go," Bochy said. "What is important is that you come out here the next day ready to go, and that's what he did."
Trevor Hoffman pitched a scoreless ninth for his 37th consecutive save and 40th of the season.
Roberts matched a career high with his third four-hit game of the season that included his career-high ninth and 10th triples. Brian Giles had an RBI single and walked twice.
The Padres spoiled the major-league debut of Mike Esposito (0-1). Given a spot start when Zach Day broke his right thumb, Esposito allowed three runs and seven hits in five innings.
"Despite his loss, I was encouraged by Esposito's outing," Colorado manager Clint Hurdle said. "He worked quickly and with poise and I think it was a good first step."
The Padres took a 1-0 lead in the first on Giles' broken-bat RBI single to right with two outs.
Shortstop Khalil Greene saved a run in the bottom of the inning. Todd Helton doubled to center and Greene's relay got Cory Sullivan at the plate.
Ardoin tied it in the second with his fifth home run.
Peavy helped himself with a leadoff single past shortstop in the third. Three pitches later, Roberts tripled past a diving Dustan Mohr in right to make it 2-1.
Roberts' second triple of the game, a gapper into right-center with two outs in the fourth, extended San Diego's lead to 3-1.
Roberts doubled into the right field corner in the sixth and had a momentary notion to keep going to third base.
"I was thinking triple to make it exciting for the fans," Roberts said. "To hit three triples in a game would have been exciting."
Ryan Klesko drew a two-out walk from reliever Jose Acevedo and Greene followed with an RBI double to make it 4-1.
Robert Fick doubled leading off the eighth inning against Justin Speier and scored on Mark Loretta's sacrifice fly.
Helton and Holliday, who had eight RBI on Tuesday, had two-out doubles in the eighth for the Rockies.
"Now we come out with Adam Eaton tomorrow and a chance to take three of four," Peavy said. "That's a big swing."
Rain forced both teams to take batting practice in the indoor batting cages. ... Colorado RHP Byung-Hyun Kim will throw a bullpen session Thursday as he tries to return from a hip injury.