By ANTONIO GONZALEZ

AP Sports Writer

SAN FRANCISCO (AP) — Drenched in all kinds of liquids poured out of a beat-up bucket that teammates conjured up in the clubhouse, Tom Koehler never felt better as a major league pitcher.

Pinch hitter Marcell Ozuna's two-run single gave Koehler his first victory in nine career starts, and the Miami Marlins rallied past the San Francisco Giants 2-1 Thursday night.

"I smell like a bar," Koehler said. "Other than the day I met my wife, this is probably the happiest moment of my life. Definitely the happiest baseball moment."

In his first career pinch-hit appearance, Ozuna's line drive to right field in the eighth inning off reliever Jeremy Affeldt (1-3) ended Koehler's run of futility. After six appearances in the bullpen, Koehler (1-5) had been winless in seven starts this season — and took the loss in his lone start last year — for the worst team in the majors.

He hugged Ozuna in the dugout following the hit that flipped the score. Koehler also had the game ball in his locker — soon to be resting on the mantle in his "man cave" back home, he said — that Steve Cishek handed to him after recording his 11th save in the ninth.

The right-hander's victory ended the third-longest winless streak to start a career in Marlins history, behind Marc Valdez's nine-start stretch from 1995-96 and Kevin Olsen's 12-start streak from 2001-02, according to STATS.

"It definitely didn't weigh on my confidence, but to say I didn't think about it would be a lie," Koehler said. "Every time I went out there I wanted to win the game. I was wondering what it would take to do it."

Giants starter Chad Gaudin tossed 4 1-3 scoreless innings, but he left the game after taking a hard line drive off his right throwing elbow. The team said he had a bruised elbow.

Far more concerning for the Giants was the status of center fielder Angel Pagan, who was on a rehab assignment with Class-A San Jose. Giants manager Bruce Bochy said Pagan injured his leg running to first base and was carted off the field. Bochy said more information on Pagan's injury would come Friday.

One of the few good moments for San Francisco came when Joaquin Arias extended his hitting streak to 11 games with an RBI triple in the seventh.

Koehler kept the Giants off the scoreboard otherwise. He didn't even allow a hit until Gregor Blanco's one-out single in the sixth. He struck out three, walked three and allowed three hits.

"He was really happy," Ozuna said.

San Francisco seems to be hounded by unfortunate injuries of late.

Gaudin took a line drive from Derek Dietrich off his elbow, fielded the ball and threw him out for the first out of the fifth inning. Gaudin grimaced as he paced around the mound, then he took a couple practice pitches before coming out.

Gaudin gave up two hits and two walks while striking out one. He was making just his fourth start of the season since entering the rotation for the injured Ryan Vogelsong.

"It didn't hit bone at all, just muscle," Gaudin said. "It's a little sore but there are no breaks or anything. It hurt. It hit square on top of the elbow. It's frustrating but something I can't control. I'll just deal with it."

It also was the second straight game the Marlins had taken out an opposing pitcher. Arizona's Trevor Cahill left in the first inning after a line drive from Ozuna bruised his right hip in Miami's 3-1 loss Wednesday.

The only blemish on Koehler's first victory came when Belt hit a two-out double in the seventh, sliding in safely when right fielder Giancarlo Stanton's throw sailed wide. Arias followed with an RBI triple in the right-center field gap.

Sandy Rosario was taken out after 2 1-3 innings when he walked Justin Ruggiano leading off the eighth. Ozuna later lined a two-out, two-run single to right on an 0-2 count against Affeldt to give the Marlins the lead.

The rookie had never pinch hit in the majors before.

"He's a pretty good pinch hitter," Marlins manager Mike Redmond quipped.

NOTES: The Marlins have won eight in a row at AT&T Park since July 28, 2010. … Giants 3B Pablo Sandoval, on the disabled list since June 9 with a strained left foot, will join Class-A San Jose on a rehab assignment Friday — a day earlier than originally expected. He will likely join the Giants in Los Angeles on Monday. … The Giants announced that Joseph Zito, the father of pitcher Barry Zito, died Wednesday in Van Nuys, Calif., at age 84. The cause of death was not disclosed. Zito, who said in a statement his father's death "has presented me with a difficulty I could not predict," was the first pitcher on the field for batting practice Thursday. He will still make his next start Saturday. … Ozuna, mired in a 1-for-20 slump, wasn't in the starting lineup off for the first time since being called up from Double-A Jacksonville on April 30. … The Marlins send Ricky Nolasco (4-7, 3.61 ERA) to the mound Friday and the Giants counter with Tim Lincecum (4-7, 4.57 ERA).

(Copyright 2013 by The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)

Join our Newsletter for the latest news right to your inbox