Updated

A three-run homer from Cody Ross in the bottom of the eighth broke a scoreless tie and lifted the Arizona Diamondbacks to a 3-1 victory in Wednesday's rubber match with the Miami Marlins.

Jose Fernandez (4-4) had limited the D'backs to three hits over seven innings, but walked a pair in the eighth before being replaced with one out.

On the fourth pitch of his at-bat, Ross sent an offering from reliever Mike Dunn into the left field seats to open up a three-run cushion for Arizona.

Heath Bell served up a solo homer to Justin Ruggiano in the ninth, but worked out of trouble to notch his 13th save and clinch a second straight win for Arizona.

Josh Collmenter tossed six shutout frames in relief for the D'backs after starter Trevor Cahill was forced to exit with a hip injury. David Hernandez (4-4) pitched a scoreless eighth to pick up the win.

Cahill took a liner off his hip in the first inning when Marcell Ozuna ripped a hard grounder back to the mound. The ball ricocheted to third and Martin Prado fielded the play to record the final out, but Cahill exited afterwards.

Collmenter filled in admirably, striking out seven while keeping the Marlins hitless through his first five innings of work. Giancarlo Stanton's leadoff single in the seventh accounted for the Marlins only hit against the righty.

"Against a team that's really aggressive, being able to speed them up and slow them down, going back and forth like that, really works in my advantage," said Collmenter.

The D'backs offense, however, had little success against Fernandez, who retired 12 in a row before issuing a leadoff walk to Jason Kubel in the eighth.

"I was just trying to make good pitches and keep the ball down," said Fernandez. "Just going with whatever (Jeff) Mathis wanted to go with, just trying to do my job."

After Ross's homer, Ruggiano led off the ninth with a blast over the center field wall to reduce the margin to 3-1.

The Marlins then had runners on first and second with no out after Ed Lucas singled and Stanton drew a walk, but Bell worked his way out of it.

Ozuna flew out to right and Arizona catcher Miguel Montero made a sliding catch on Derek Dietrich's pop up in foul territory. Bell then got Logan Morrison to strike out to seal the outcome.

Game Notes

Fernandez had the longest outing of his career by pitching 7 1/3 innings ... The D'backs won consecutive games for the first time since June 4-5 ... Miami had five hits and Arizona only had four ... The Marlins were 0-for-4 with runners in scoring position.