DENVER — Pinch-hitter Jason Giambi’s two-run homer off Jonathan Papelbon capped a three-run rally in the ninth inning, and the Colorado Rockies overcame an off night by ace Ubaldo Jimenez to beat the Boston Red Sox 8-6 Wednesday night.

Giambi sent a 1-0 pitch into the right-field seats after Ian Stewart had tied it at 6 with a leadoff drive against Papelbon (2-4), who blew his second save in 18 chances.

Manny Corpas (2-4) picked up the win with a scoreless inning of relief.

Jimenez, who was seeking his 14th win, was staked to an early four-run lead, which seemed safe considering he hadn’t allowed more than three runs in a start all season. But he gave up six runs and 10 hits over 52/3 innings against Boston in the worst game of his spectacular season.

Until Stewart’s shot, Boston right-hander John Lackey was in line for the win after allowing five runs and 10 hits in 62/3 innings. He helped himself out with two hits off Jimenez after entering the game just 1 for 31 at the plate in his major league career.

Despite hitting 100 mph with his fastball, Jimenez labored more than usual and didn’t even make it out of the sixth in his bid to set a franchise record with wins in eight straight starts. It was his shortest outing of the season and his ERA rose from 1.15 to 1.60.

Jimenez had a stretch of 10 starts from April 17 to June 6 when he gave up a total of six runs.

Manager Jim Tracy said between innings on a TV broadcast that Jimenez wasn’t struggling with anything health related even though he had sent him home 24 hours earlier after he complained of feeling dizzy.

Jimenez was tagged for two runs in the second and four in the sixth as the Red Sox rallied to take a 6-5 lead.

Huston Street replaced Jimenez in his first appearance of the season after spending 21/2 months on the disabled list with right shoulder inflammation and a strained left groin. The closer allowed one hit in 11/3 scoreless innings.

Daniel Nava hit a two-run double in the fourth and sparked the sixth-inning outburst with an RBI double off Jimenez. Darnell McDonald hit a tying two-run homer with two outs, and Lackey doubled and scored on Marco Scutaro’s single to give Boston a 6-5 lead.

That chased Jimenez, who was trying to become the first NL pitcher in 98 years to win 14 of his first 15 starts. The last was Rube Marquard, who won his first 18 starts in 1912.

Miguel Olivo hit a two-run drive off Lackey in the second inning for his 10th homer, and Colorado added two runs in the third.

Brad Hawpe drove in a run with a groundout and Seth Smith’s sacrifice fly made it 4-0.

The Red Sox sliced their deficit in half in the fourth. One strike away from escaping a two-on jam, Jimenez twice shook off catcher Olivo before throwing a curveball that Nava sent into the gap in right-center field.

Jimenez made it 5-2 in the fourth when he drove in Clint Barmes with a single to right.