San Francisco, CA (Sports Network) - Pinch-hitter Marcell Ozuna delivered the go-ahead single in the top of the eighth and the Miami Marlins edged the San Francisco Giants, 2-1, in the opener of a four-game series at AT&T Park.

Sandy Rosario, who had already thrown 2 1/3 shutout innings, started the inning for the Giants. However, after walking Justin Ruggiano, Jeremy Affeldt (1-3) came in relief.

He hit Derek Dietrich with a pitch before Adeiny Hechavarria moved the runners into scoring position with a sacrifice bunt. Ozuna's single to right brought Ruggiano and Dietrich home to give the Marlins the lead.

Chad Qualls was perfect in the eighth and Steve Cishek notched his 11th save with a scoreless ninth.

Miami starter Tom Koehler (1-5) carried a no-hitter into the sixth before giving up a one-out single to Gregor Blanco. He allowed one run on three hits and three walks over seven frames.

"I think we've been fighting all year and now the offense is coming along," said Koehler. "I think we're going to put up a couple of good runs and surprise some people."

Giants starter Chad Gaudin allowed just two hits and two walks over 4 1/3 innings but left the game after getting hit in the right elbow by a line drive by Dietrich. He was able to pick the ball up and throw him out, but after throwing a few warmup pitches, he was taken out of the game.

Neither team managed much offense until the bottom of the seventh. Brandon Belt ripped a two-out double to right center. Next up was Joaquin Arias, who tripled deep into right to put the Giants on the board.

Cishek gave up a one-out single to Buster Posey, but got Hunter Pence to pop out to shortstop and struck out Belt to end the game.

"I think we were a little late with some of those pitches tonight," said Giants manager Bruce Bochy. "I want the guys to be aggressive when it's in the strike zone but we had a couple of guys who have their style of hitting. I think we were a little too passive tonight."

Game Notes

Juan Pierre went 0-for-4, ending a 14-game hitting streak ... Arias has an 11-game hitting streak ... The Marlins were 1-for-5 with runners in scoring position ... Since 2011, Cishek leads all relievers with a 0.73 ERA against the NL West.