SAN FRANCISCO (AP) -- Ricky Nolasco handed the defending World Series champions their first home loss in a month with the sort of pitching performance they're used to producing themselves.
Nolasco pitched scoreless ball into the ninth inning and the Florida Marlins quieted the streaking Giants with a 5-1 victory Tuesday night, snapping San Francisco's nine-game home winning streak.
"I would've liked to finish it," he said. "But it was a big win to start the road trip against these guys."
Gaby Sanchez had a three-run double and Mike Stanton hit his 11th home run of the season to help the Marlins win for the third time in four games. San Francisco had won five straight overall to move into first place in the NL West and hadn't lost at home since April 24 against Atlanta.
Omar Infante added three singles and Sanchez finished with three hits to chase Giants starter Matt Cain (3-3) after six innings.
Nolasco (4-0) loaded the bases with one out in the ninth before Leo Nunez entered to get his major league-best 18th save this season. Nolasco struck out five and was charged with one run on seven hits.
"I think that was so far his best performance of the year," Florida manager Edwin Rodriguez said.
The Marlins didn't waste a chance to shine out West.
They were patient against Cain as he struggled with his command early, giving up four runs on six hits. He struck out four but tied his season high with three walks, and the Marlins took advantage of all the free passes.
Cain walked Hanley Ramirez and Logan Morrison with two outs in the third to load the bases. Sanchez followed with a bases-clearing double to right-center, giving Florida a 3-0 lead.
"That's my fault. That can't happen," Cain said. "That can't happen at all and that's the reason we lost. I didn't make the pitches to get him out and finish the inning."
Stanton sent the first pitch of the fourth inning just over the center-field wall to put the Marlins ahead 4-0. Andres Torres seemed to be in position to make the catch, reaching up to snatch the ball only to have his glove hit the padding. Torres watched as the ball barely sailed over the 399-foot sign on the wall.
That was more than enough support for Nolasco.
The hard-throwing right-hander with the big breaking ball had hitters baffled almost from the start. Torres had a leadoff double in the first and advanced to third on a groundball two batters later before Buster Posey flied out to right.
San Francisco didn't come close to scoring again until the ninth, when Posey singled and Cody Ross hit a double. Nolasco walked Mike Fontenot before Nunez entered.
All the Giants could muster off the Marlins' closer was a sacrifice fly from Miguel Tejada before Emmanuel Burriss flied out to right to end the game.
Nolasco challenged the quick-swinging Giants by pounding the strike zone with a combination of curves. He had innings of eight, nine and 10 pitches in a performance that was simply dominant.
The Marlins added another run in the eighth when Chris Coghlan had a leadoff double. Ramirez bunted him over, and Coghlan scored two batters later on reliever Guillermo Mota 's wild pitch.
After three straight no-decisions, Nolasco earned his first win since May 1 at Cincinnati. He also threw a two-hit shutout at San Francisco on Aug. 19, 2008.
"It's going to be a tough night when he's on," Giants manager Bruce Bochy said. "He knows what he's doing out there. We couldn't do much. We had a couple chances but just couldn't get the big hit. We tried there at the end. We just ran into a well-pitched game."
NOTES: Giants LHP Barry Zito faced hitters for the first time since going on the disabled list April 17 with a sprained right foot. Between his bullpen session and the simulated game, he threw about 100 pitches. He is expected to pitch in extended spring training in Arizona later this week. ... Marlins RHP Josh Johnson will do some light tossing Wednesday, the first throwing he's done since being placed on the disabled list last week with right shoulder inflammation. ... The Marlins recalled RHP Steve Cishek from Triple-A New Orleans and designated RHP Jay Buente for assignment. ... Posey extended his hitting streak to 12 games with a single in the seventh.