DENVER -- Nolan Arenado hit a three-run homer in the bottom of the ninth, giving him the cycle and lifting the Colorado Rockies to a 7-5 win over the San Francisco Giants on Sunday.
Arenado connected against Giants closer Mark Melancon (1-2) for the eighth cycle in franchise history and first since Michael Cuddyer in 2014.
It was the Rockies' first walk-off homer of the season and second walk-off win, and it enabled the Rockies to sweep a four-game series from the Giants for the first time.
The Giants had scored three runs in the top of the ninth, two on Hunter Pence's first career pinch-hit homer, to take a 5-3 lead.
Pence's homer came against Jake McGee. He issued a one-out walk to Gorkys Hernandez before Pence connected on an 0-1 fastball clocked at 95.9 mph to put the Giants ahead 4-3.
With one out, Joe Panik singled. He broke for second and was picked off, but first baseman Mark Reynolds threw the ball well past second base. Brandon Crawford, who put the Giants ahead 2-0 with a two-run homer in the fifth, then doubled Panik home to give San Francisco a two-run lead.
George Kontos pitched 1 1/3 innings in relief of starter Ty Blach before Melancon took the mound.
Melancon gave up a one-out single to Raimel Tapia, who dashed to third when Charlie Blackmon followed with a single. Tapia scored when DJ LeMahieu grounded a single to right that sent Blackmon to third.
The reduced the Giants' lead to 5-4 before Arenado's blast ended it.
The Rockies are 10-1 against the Giants this year and have beaten them nine straight times, their most consecutive wins against any National League West opponent.
The Rockies have won five straight games overall and 12 of their past 15. The loss was the season-high sixth straight for the Giants, who have dropped 15 of their past 19 games.
The Rockies took a 3-2 lead in the seventh against Blach, a Denver native making his first career start at Coors Field. Trevor Story led off with his 10th home run, and two batters later, Pat Valaika hit his first career pinch-hit homer and fifth of the season.
Valaika connected on Blach's first-pitch fastball and is 7-for-21 with four RBIs as a pinch hitter this season.
Story has at least one RBI in six of his past seven games.
Blach, who made his major league debut at Coors Field in September, gave up seven hits and three runs in 6 2/3 innings with two walks and five strikeouts.
After putting their leadoff batter on base without scoring in the first four innings, the Giants finally broke through against Tyler Chatwood in the fifth.
With one out, Denard Span walked for the third straight time, and Crawford hit an opposite-field home run down the left field line with two outs to put the Giants ahead 2-0. The homer was Crawford's sixth and came on a 2-1 fastball from Chatwood that registered 95 mph but was in an ideal spot for Crawford, just above his belt and over the plate.
Arenado made it 2-1 with an RBI double in the sixth that left him a home run shy of the cycle. It was Arenado's fifth double in three games and came after LeMahieu's leadoff walk. But Blach retired Reynolds and Ian Desmond on popups and Carlos Gonzalez on a grounder.
Blach retired Blackmon on a ground out with a runner on second to end the fifth as he continued to thwart the Rockies. He gave up two singles to start the fourth but got Desmond to ground into a double play and struck out Gonzalez.
Blach stranded runners at first and third in the first when Desmond hit into a fielder's choice following Arenado's two-out triple and a walk.
Chatwood, who was 2-4 with a 7.03 ERA in six previous starts at Coors Field this year, threw a season-high-tying 114 pitches in six innings and allowed five hits and two runs with four walks and five strikeouts.
NOTES: Rockies RHP Carlos Estevez was recalled from Triple-A Albuquerque and struck out the one batter he faced in the ninth. ... Rockies RHP Chad Qualls (lower back spasms) was placed on the 10-day disabled list retroactive to Friday...Rockies RHP Chad Bettis (cancer) threw 15 fastballs in his first bullpen session from 60 feet, 6 inches...Rockies OF Gerardo Parra (strained right quadriceps) ran outside at about half speed for the first time since he was injured June 6...Giants outfielder Jarrett Parker (broken right clavicle) will begin a rehab assignment Monday with Triple-A Sacramento...Giants LHP Madison Bumgarner (bruised ribs, sprained left shoulder) is scheduled to throw a second simulated game Wednesday at the Giants' complex in Scottsdale, Ariz.
Mel Gibson's Braveheart is a violent, passionate epic about the real-life Scottish hero William Wallace, who, from 1297 to 1305 A.D., led a revolt against the ruling English that eventually led to the independence of Scotland. Until Braveheart came out, ...