Updated

Jordan Pacheco's first homer of the year resulted in his first career grand slam, and it helped the Rockies snap a 10- game skid against the San Francisco Giants.

Pacheco's blast broke a tie in the fifth inning and carried Colorado to a 10-9 win at Coors Field in the second portion of a four-game series.

The Giants rallied from a six-run deficit Thursday for an 8-6 win and nearly came back again Friday night.

Buster Posey's solo homer in the eighth inning brought the Giants within a run, but Rafael Betancourt struck out the side in the ninth to pick up his 10th save of the year.

"It's important for us to put away games, no matter who we're playing against. It's just nice to be able to fight back and put away a game at the end," Rockies manager Walt Weiss said.

Pacheco drove in five runs and Carlos Gonzalez also homered for the Rockies.

Jorge De La Rosa (5-3) allowed nine hits and five runs over five innings for Colorado, while Madison Bumgarner (4-2) yielded eight hits and nine runs -- seven earned -- in 4 2/3 frames for the Giants. Bumgarner had a six-game winning streak against the Rockies broken.

Pablo Sandoval went 3-for-5 with a pair of RBI in the loss, while Marco Scutaro also had three hits and drove in a run.

"This offense is doing a good job of coming back, but we have to get this pitching back on track," Giants manager Bruce Bochy said.

Scutaro singled to left field with one out in the opening inning to extend his hitting streak to 16 games. Sandoval then doubled and Posey followed with a sacrifice fly to right for a 1-0 San Francisco lead.

The Giants widened the gap in the second inning. Eric Young failed to make a diving catch on a ball that Brett Pill hit down the right-field line that resulted in a double. Pill then scooted to third on a fly ball to center from Andres Torres. Replays, though, showed Pill was out at third on a great throw from Torres, with Nolan Arenado applying a shoulder tag. Brandon Crawford followed with an RBI single to right.

Scutaro and Sandoval singled in runs later in the second to make the score 4-0.

The Rockies got their first run in the bottom half on Pacheco's RBI groundout, soon after Bumgarner threw the ball into center field trying to start a double play.

Colorado tied it at 4-4 in the third thanks to four consecutive singles, the last two by Gonzalez and Troy Tulowitzki.

Sandoval's single plated Angel Pagan in the fourth, but the Rockies scored five times in the fifth. Wilin Rosario's single to left scored Dexter Fowler for a 5-5 tie. D.J. LeMahieu then walked to fill the bases for Pacheco, who blasted a pitch from Bumgarner well over the wall in left field.

Gonzalez made it 10-5 with a homer to center off George Kontos in the sixth, but the Giants battled back with three runs in the seventh.

Hunter Pence's triple to right scored Posey for the first run. Pence came home on Edgmer Escalona's wild pitch, and pinch-hitter Joaquin Arias singled in Pill later in the frame.

With a runner on third and two outs, Pagan lined out to a diving Fowler in center field to end the frame.

"It's a game changer. He's so valuable roaming that center field for us. That was a big-time play," Weiss said.

Game Notes

Scutaro is hitting .485 (32-for-66) during his hitting streak ... Giants pitchers have allowed 44 home runs this season in just 42 games ... San Francisco left nine men on base.