DENVER (AP) Buster Posey connected for his 100th career home run and Matt Duffy hit a tiebreaking two-run triple in a five-run fifth, backing a gritty effort from Madison Bumgarner as the San Francisco Giants beat the Colorado Rockies 7-4 Sunday.

Bumgarner (17-7) went six innings and allowed four runs and nine hits, twice working out of bases loaded situations and escaping with marginal damage. He walked one and struck out three in helping the Giants salvage a split of the four-game set with the Rockies and win successive games on the road for the first time in a month.

Helping to break open a tight game, Duffy tripled to center off Yohan Flande (3-2) after consecutive singles by Gregor Blanco and Kelby Tomlinson. Flande intentionally walked Posey and was relieved by Brooks Brown. Marlon Byrd, who had four hits on the day, greeted Brown with an RBI single.

More from FoxSports

Rex Brothers relieved and walked Brandon Belt before Brandon Crawford laced a two-run double to center.

The Rockies had the bases loaded with none out in the sixth when Cristhian Adames hit a two-run single, pulling Colorado within three runs.

But Bumgarner then got hot-hitting Nolan Arenado to ground into a double play, pumping his arm in celebration after the play, before retiring Carlos Gonzalez on a lineout to first.

Santiago Casilla pitched a perfect ninth for his 32nd save in 37 opportunities.

Arenado finished with a double and a run-scoring fielder's choice, snapping his team-record home run streak at six games.

Down 2-0 early, the Giants evened the score when Posey led off the fourth with his 17th home run of the season, driving an offering from Flande into the Rockies bullpen behind the right-center field fence.

The Rockies loaded the bases with none out in the first, but Bumgarner then retired the next three batters, limiting the damage to two runs on a fielder's choice by Gonzalez and a sacrifice fly by Wilin Rosario.

TRAINER'S ROOM

Giants: C Hector Sanchez will miss the rest of the season after suffering a left ankle sprain and strained left hamstring running out a sacrifice bunt during Friday's game. . C Andrew Susac has been placed on the 60-day DL because of a lingering right wrist injury. ... OF Nori Aoki has experienced some post-concussion symptoms and was being sent to Pittsburgh, where he was to be examined later this week by Dr. Michael Collins, a concussion specialist.

Rockies: LF Corey Dickerson, on the disabled list with a right rib fracture, was scheduled for a minor league rehab assignment and is slated to rejoin the team Monday in Arizona to get a fresh evaluation of the injury. . C Nick Hundley left the game in the seventh inning with neck stiffness. He's listed as day to day.

UP NEXT

Giants: Continuing a 10-game road trip, the Giants send Mike Leake (9-7) to the mound for the opener of a three-game set at Arizona.

Rockies: RHP Kyle Kendrick (6-16) will be seeking his first win since late July when he starts the series opener Monday at San Diego.