Cody Ross belted a three-run home run in the eighth to boost the Diamondbacks to a series-clinching 3-1 win over the Miami Marlins in front of 26,867 at Chase Field on Wednesday.

Ross, pinch-hitting for reliever David Hernandez, came to the plate hitless in his previous 14 at-bats, but broke that skid by planting a ball into the left-field stands to put the Diamondbacks up 3-0. It was his third home run of the season and fifth pinch-hit homer of his career.

“I was trying to get some wood on it and try to get one in,” Ross said. “I fortunately got a pitch I could handle and got some under it and it carried.”

Starter Trevor Cahill pitched a breezy first, but was hit in the hip on a comebacker on the final out of the inning. Cahill threw warmup pitches before the second, stopped to talk to a trainer and then threw three pitches to leadoff batter Derek Dietrich before having to leave the game with what was later announced as a hip contusion.

Josh Collmenter relieved Cahill, throwing six scoreless innings to get the Diamondbacks to the eighth, which David Hernandez completed in three batters.

Heath Bell converted his ninth consecutive save opportunity, but not before giving up a solo home run, a single and a walk to start the bottom of the ninth.

Collmenter deals: Taking over for Cahill three pitches into the second inning, Collmenter logged the second-longest relief appearance in team history. Collmenter lasted six scoreless innings, giving up one walk, one hit and striking out seven.

“The change-up was really effective,” Collmenter said. “They’re a team that’s really aggressive against the fastball, so we were trying to speed them up with the fastball and I was able to locate the change-up down in the zone to get some swings-and-misses.”

The longest relief appearance in Diamondbacks history belongs to Randy Johnson, who pitched seven relief innings in 2011. That comes with an asterisk, though, as the game was suspended in the third inning and Johnson pitched the rest of the game the next day.

Collmenter also became the first Diamondbacks pitcher to log three relief appearances of at least four innings in one season, and is the fifth National League pitcher to do so since 2008.

“I joked with (the bullpen), ‘You guys just want me to go eight?’ ” Collmenter said. “And (Joe Paterson) said, ‘How about seven and two-thirds, and I’ll come in and face the lefties.’ ”