DENVER — Ian Desmond picked a good time to get his first home run at Coors Field as a member of the Colorado Rockies.

Desmond hit a game-changing three-run homer in the fifth and finished with four RBIs to help the Rockies beat the San Francisco Giants 10-8 on Friday night.

Colorado rookie Antonio Senzatela battled through six innings to tie for the major league lead in wins, and DJ LeMahieu had four hits for the second game in a row for the Rockies, who have won seven in a row against the Giants.

Desmond, who signed a five-year, $70 million contract in the offseason, hasn’t showed much power after starting the season on the disabled list. Friday’s homer was just his fifth but it gave the Rockies a lead they never ceded.

“Our pitchers have been carrying us all year long and I just want to pick them up,” Desmond said. “That’s all we want to do. To be able to deliver with two strikes, we needed that. For me it was nice to help out Senzatela and the team.”

Senzatela (9-2) tied Clayton Kershaw, Dallas Keuchel and Jason Vargas for the most wins despite giving up three home runs. Joe Panik, who also doubled twice, and Denard Span had solo shots and starter Jeff Samardzija (2-9) hit a two-run homer that gave the Giants a 4-1 lead in the fifth.

“It wasn’t a really good game for me but we won. That’s good,” Senzatela said.

The Rockies rallied for five runs in the bottom of the fifth, three on Desmond’s homer.

Trevor Story hit a pinch-hit homer in the sixth and Desmond had a sacrifice fly in Colorado’s three-run seventh.

The Giants got two in the eighth and one more in the ninth off closer Greg Holland, who earned his major league-best 24th save.

San Francisco has lost four in a row and 13 of 17 to fall 17 games below .500.

“We had the winning run up there,” manager Bruce Bochy said. “We just can’t finish it off.”

Bochy was ejected by home plate umpire Gary Cederstrom in the top of the seventh for arguing balls and strikes after Samardzija walked LeMahieu in a seven-pitch battle.

“Listen, we’re in the seventh inning. Lot of emotions,” Samardzija said. “I was out there fighting. That’s the way it goes sometimes.”

TRAINER’S ROOM

Giants: LHP Madison Bumgarner is scheduled to throw a bullpen session in Arizona Saturday. He has been out since mid-April with a left shoulder AC strain suffered in a dirt bike accident in Colorado.

BEST CASE SCENARIO

Giants catcher Buster Posey and infielder Eduardo Nunez were feeling fine after both left Thursday’s game with injuries. Posey hurt his left ankle hitting a home run but didn’t need an MRI or X-ray. He walked as a pinch-hitter Friday.

“I don’t know if we could have gotten better news because he was in a lot of pain,” Bochy said. “I thought it was going to be quite a while but we got the news much later that he’s doing so much better. It was a little bit of an impingement, maybe some scar tissue.”

Friday's games

SCL

Analy at Healdsburg, 7:30 p.m.

Petaluma at El Molino, 7:30 p.m.

NBL

Rancho Cotate at Santa Rosa, ppd.

Maria Carrillo at Ukiah, ppd.

Cardinal Newman at Windsor, ppd.

Montgomery at Casa Grande, ppd.

NCL I

Lower Lake at Clear Lake, 7 p.m.

Fort Bragg at Middletown, 7:30 p.m.

St. Helena at Willits, ppd.

NCL III North

Anderson Valley at South Fork, 7 p.m.

Upper Lake at Laytonville, 7 p.m.

NCL III South

Rincon Valley Christian at Tomales, 7 p.m.

Saturday’s games

SCL

Sonoma Valley at Piner, ppd.

NCL I

Kelseyville at St. Vincent, 11 a.m.

NCL III North

Round Valley at Roseland Collegiate Prep, ppd.