Cody Ross can see clearly now, so he must have had a nice view as his decisive pinch-hit home run sailed into the left-field seats.

Ross’ three-run shot in the eighth inning spoiled an outstanding outing by Miami’s young Jose Fernandez, and the Arizona Diamondbacks held off the Marlins 3-1 on Wednesday to take two of three in the series.

Fernandez (4-4) retired 14 in a row before walking two of the three batters he faced in the eighth. He was relieved by left-hander Mike Dunn, who gave up the home run to Ross on a 1-2 pitch.

“I was just trying to create something,” Ross said. “It hasn’t been too often this year that I’ve contributed, so it feels nice. “

Ross says he has been bothered by blurred vision all season with problems with his contact lenses drying out, but a three-hour trip to the eye doctor on Wednesday finally found the right combination of lenses and eye drops.

“Honestly I was going up there with blurry vision half the time at the plate,” Ross said. “It’s hard enough to hit in this league when you’ve got good vision, as opposed to going up with blurry vision. But it’s just one of those things where you don’t want to make excuses, but it’s a true story. It was tough.”

Arizona starter Trevor Cahill left after a line drive bruised his right hip in the first. Josh Collmenter allowed one hit in six innings of relief, the latest in a series of his effective long-inning relief outings.

“It’s kind of unbelievable what he can do,” Cahill said, “pitch like a starter in a moment’s notice. That’s why he’s invaluable.”

Cahill said he thought he could have stayed in and pushed through the injury but the decision was made to play it safe.

Justin Ruggiano homered off Heath Bell to start the ninth.

Bell flirted with bigger trouble before recording his 13th save in 15 tries.

After Ruggiano’s homer, Ed Lucas singled to bring up Giancarlo Stanton, whose home run off Bell on Friday gave Miami a 3-2 victory. Stanton walked on five pitches to put runners on first and second with no outs.

Bell got Marcell Ozuna on a flyout, catcher Miguel Montero made a nice sliding catch of Derek Dietrich’s foul to the screen and pinch-hitter Logan Morrison struck out to give Arizona two of three against Miami.

David Hernandez (4-4) pitched a scoreless eighth to get the victory.

Fernandez, the 20-year-old Cuban refugee and a first-round draft pick in 2011, was charged with two runs on three hits with four strikeouts and those two costly late walks in 7 1-3 innings.

“This kid’s impressive. He’s got really good stuff. I think he’s got Cy Young stuff in the future,” Montero said. “I see him as a Cy Young (winner) in the near future because he’s got all his pitches. He’s that good.”