DENVER — The decisive moment of Jon Gray's start Wednesday in the series finale against the Giants came in the fourth inning, when he loaded the bases with one out while holding a 4-2 lead.

The right-hander proceeded to issue consecutive walks to tie the game, and San Francisco dinged relievers Harrison Musgrave and Jake McGee for three more runs after that as the Rockies fell 7-4 at Coors Field.

Nolan Arenado got things going for Colorado with a three-run, no-doubt homer to left in the bottom of the first, giving the Rockies an early 3-0 lead.

When San Francisco came back with two runs in the second off a Gray wild pitch and a Pablo Sandoval RBI single that followed, the Rockies — looking as if they had carried over momentum from Tuesday's 11-run laser show — responded with a Charlie Blackmon RBI single in the bottom of the frame to make it 4-2 Colorado.

But once the Giants tied the game and chased Gray in the fourth — the second time they've done so to Gray in as many outings, roughing him up for five runs in 3 ⅔ innings May 19 at AT&T Park — San Francisco owned the momentum the rest of the night.

Upon relieving Gray, Musgrave induced an Andrew McCutchen double play to get out of the inning without further damage. But San Francisco tagged the southpaw, who in May had yielded just one run in eight innings of work coming into the game, for two hits on two runs in the fifth to go up 6-4.

From there, two innings by Scott Oberg and one apiece by Jake McGee and Chris Rusin gave the Rockies a chance to come back as they had the night before, even with Buster Posey's RBI single off McGee in the eighth. But Colorado was bested by the Giants' bullpen.

While the Rockies made San Francisco starter Derek Holland look average over five innings, Reyes Moronta, Tony Watson, Sam Dyson and Hunter Strickland locked down the final four frames, allowing only three hits while sucking the energy out of the home crowd.

Colorado (30-26) remains a game ahead of Arizona atop the National League West standings, with the Dodgers (4.5 games back heading into today) coming into town for a three-game set starting Friday.