Daniel Murphy hit a two-run, pinch-homer during a five-run seventh inning to lead the Colorado Rockies over the San Francisco Giants 6-4 on Thursday.

Trevor Story and Charlie Blackmon also homered for the Rockies to spoil Tyler Anderson’s return to Coors Field.

Anderson was Colorado’s opening day starter in 2019, but knee surgery in June ended his season after going 0-3 with an 11.76 ERA. The Giants picked him up off waivers in October, and Thursday was his second start in four games for them.

San Francisco Giants starting pitcher Tyler Anderson throws against the Colorado Rockies during the first inning of a baseball game, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

San Francisco Giants starting pitcher Tyler Anderson throws against the Colorado Rockies during the first inning of a baseball game, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

In a battle with Rockies starter and fellow lefty Kyle Freeland, he threw five shutout innings, struck out three and gave up two hits, both singles.

Story’s one-out home run off Wandy Peralta in the sixth gave Colorado a 1-0 lead, beginning a surge of runs. Mauricio Dubon hit a three-run homer off Freeland with two outs in the seventh to put the Giants ahead, but reliever Rico Garcia (0-1) couldn’t hold it.

Two doubles and Murphy’s home run — his second — leading off the bottom half on the seventh put the Rockies back in front.

Colorado Rockies starting pitcher Kyle Freeland throws against the San Francisco Giants during the first inning of a baseball game, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

Colorado Rockies starting pitcher Kyle Freeland throws against the San Francisco Giants during the first inning of a baseball game, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

David Dahl singled and Blackmon hit his second homer of the season into the second deck in right off of Caleb Baragar to give Colorado a three-run lead.

Jairo Diaz got the last four outs for his third save in three chances, and Yency Almonte (1-0) allowed a run in an inning of relief.

TRAINER’S ROOM

Colorado Rockies' Trevor Story points to the sky after hitting a solo home run as San Francisco Giants catcher Chadwick Tromp looks on during the sixth inning of a baseball game, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

Colorado Rockies' Trevor Story points to the sky after hitting a solo home run as San Francisco Giants catcher Chadwick Tromp looks on during the sixth inning of a baseball game, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

Giants: Manager Gabe Kapler said RHP Trevor Cahill (right index finger) will throw three innings in Sacramento on Friday. Cahill has not pitched for San Francisco this year.

ROSTER MOVES

Teams were required to trim their rosters from 30 to 28 on Thursday, and the Giants placed lefty Andrew Suarez and outfielder Steven Duggar on their taxi squads. Colorado optioned infielder Josh Fuentes and right-hander Ashton Goudeau to its alternative training site at Metro State University in Denver.

San Francisco Giants' Mauricio Dubon reacts at he reaches home plate after hitting a three-run home run in the seventh inning of a baseball game against the Colorado Rockies, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

San Francisco Giants' Mauricio Dubon reacts at he reaches home plate after hitting a three-run home run in the seventh inning of a baseball game against the Colorado Rockies, Thursday, Aug. 6, 2020, in Denver. (AP PhotoJack Dempsey)

UP NEXT

Giants: Start a three-game series at the Los Angeles Dodgers on Friday night. Kapler has not announced a starter for the first game.

Rockies: RHP Antonio Senzatela (2-0, 2.45) will face LHP Yusei Kikuchi (0-0, 4.66) when Colorado opens a three-game series at the Seattle Mariners on Friday night.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports