PHOENIX -- Rockies right-hander Ubaldo Jimenez has a generous side. It was on display in the first two innings Sunday afternoon, when he gave up four hits and two walks. But the D-backs couldn't manage more than one run.

Jimenez fanned Justin Upton to end the second with the bases loaded. Then he found his fastball and turned sinister.

Jimenez retired 12 straight at one point in lifting the National League Wild Card-leading Rockies to a key 5-1 victory at Chase Field before 29,397.

The glowing start against the D-backs and his previous outing -- in which he gave up seven runs (six earned) in 2 2/3 innings while losing to the Giants -- had common ground.

Jimenez struggled with his fastball early. But if third baseman Garrett Atkins had not committed an error on a grounder that should have led to a double play in the first inning against the Giants, he might have had a chance to right himself then.

"That's what I've learned about me -- probably in the first two innings I'm never as sharp as the game gets going," said Jimenez, who struck out eight in seven innings and held the D-backs to one run on five hits.

Unless the Rockies have an unlikely collapse, folks will be learning more about Jimenez (14-11) when the playoffs start.

The Rockies increased their Wild Card lead to 4 1/2 games over the Giants, who lost to the Dodgers on Sunday. The Marlins and Braves, the next-closest contenders, also lost on Sunday. To top it off, the Rockies return to Coors Field for a nine-game homestand.

The Rockies scored five times in the seventh and eighth innings -- including Jason Giambi's two-run shot in the eighth for his second homer in two games -- off D-backs ace Dan Haren (14-9). They return home with offensive momentum.

They scored 15 runs and knocked 19 hits in the final two games against the D-backs after struggling for much of a road trip that saw them end up a respectable 4-5.

"When we left on this trip, we were 4 1/2 ahead [in the Wild Card], and over the course of 10 days we go back home and we have the same lead that we had when we left," Rockies manager Jim Tracy said.

Sunday's victory also improved the Rockies to 40-38 on the road. The win total is a club record. Even if they've locked up a playoff spot by then, they could have something at stake when they meet the Dodgers to end the regular season at Dodger Stadium -- the first winning road season in club history.

Sunday's effort showed the Rockies are strong enough to compete anywhere.

"To be frank, I think they showed us why they're a better team," D-backs manager A.J. Hinch said. "They beat our best and they did it methodically."

Jimenez forced Mark Reynolds into a grounder to third to end the first. Giambi had to leave the bag for third baseman Ian Stewart's throw and tag Reynolds. The D-backs had three singles in the second, including Haren's to drive in a run with one out.

Jimenez struck out Chris Young, walked Stephen Drew to load the bases, then struck out Upton. Both of those strikeouts came on sliders.

"That was a big situation in the game right there," Jimenez said. "If they had scored more than two runs, you knew Haren was going to get comfortable."

Haren, who didn't give up a hit until Giambi's single to open the fifth, saw the damage Jimenez can do when he becomes comfortable.

"The guy's got some of the best stuff in baseball and once the guy puts everything together, he's going to be pretty special," Haren said. "I tip my cap to him. He's having a really good year, a coming-out year for him and he just got the better of me."

The Rockies manufactured three runs in the seventh. Clutch-hitting catcher Yorvit Torrealba singled with runners at the corners to tie the score and improve to 17 for his past 23 (.739) with runners in scoring position. Stewart singled in another run, and Clint Barmes brought Torrealba home on a squeeze bunt.

Giambi, who had 11 homers with the Athletics earlier this year and is hitting .400 (6-for-15) with two homers and 11 RBIs since joining the Rockies on Sept. 1, put the game out of reach with his eighth-inning shot.