Updated

The home run came with the bases empty, as usual. And that was the extent of the San Francisco Giants' run production.

Pablo Sandoval's first-inning homer provided a lead, but it was gone before the inning ended, and the Giants lost Friday night to the Florida Marlins 2-1.

The Giants, starting a 10-game trip, lost for the 12th time in 17 games and continued to sputter on offense. They're next to last in the majors in runs and have totaled 15 in the past eight games.

"We've said quite a few times during the stretch that we're better than this," manager Bruce Bochy said. "But we have to show it."

With Sandoval's homer, the Giants set a major league record for consecutive solo home runs. Their past 20 homers have been solo shots, breaking the record of 19 set by the Philadelphia Phillies in 1914.

San Francisco fell to 0-4 this season against erratic Florida. There was no evidence of lingering ill will between the teams, who met for the first time since their series in May, when Giants catcher Buster Posey broke his leg in a collision with Florida's Scott Cousins.

Cousins is on the disabled list himself with an injury unrelated to the collision, and before the game both managers said their teams wanted to move beyond the episode.

The Marlins had been 0-7 on their homestand, but Ricky Nolasco (9-8) barely outpitched All-Star Matt Cain (9-9). Nolasco allowed one run in eight innings, and Leo Nunez earned his 32nd save in 36 chances by pitching an eventful ninth.

Nunez gave up a leadoff single to Sandoval, and with one out Cody Ross hit a drive to deep center. Center fielder Dewayne Wise — a ninth-inning defensive replacement with a reputation for spectacular catches — retreated to the edge of the warning track, turned, stumbled and reached out as he fell to make a circus catch.

"He falls down, you like your chances there," Bochy said. "But he made a great catch."

After the game, Wise stood at his locker smiling as he listened to a description of the play by teammate Logan Morrison.

"When Ross hit it, it was, 'Oh crap,'" Morrison said. "Then it was, 'Oh, he's got a bead on it.' Then it was, 'Oh crap, he's falling down.' Then, 'Ah, he made the catch.' It wasn't exactly the perfect graceful catch, but we'll take it for sure."

Ross went 0 for 4 playing in Miami for the first time since the Giants acquired him from Florida on a waiver claim last August. The top of the order — Andres Torres and Jeff Keppinger — was a combined 0 for 7. The Giants didn't advance a runner beyond first base in the final six innings.

One bright spot was Sandoval, who went 2 for 3 and is hitting .375 over the past 11 games.

"I don't care about me," he said. "I just want to win games."

He gave San Francisco a brief lead when he hit his 14th homer with two out in the first.

Florida came back with two runs in the first on three consecutive one-out hits. Alfredo Amezaga singled, Morrison tripled and Mike Stanton singled.

"It ended up being my fault that we lost," Cain said. "I've got to make better pitches early."

Cain settled down to pitch six innings, allowing no more runs, but lost his third start in a row.

Nolasco gave up six hits, but the only walk he allowed was intentional, and he benefited from good defense. San Francisco hit into two double plays and lost another runner when Aubrey Huff was thrown out trying to steal.

"The defense will make better plays when you throw more strikes," Nolasco said. "I was trying to do that and keep them on their toes."

Notes: Giants OF Carlos Beltran (strained right hand) missed his fourth consecutive game. Bochy didn't rule out putting Beltran on the disabled list but said the Giants hope he'll heal quickly after he received a shot. ... Giants OF Nate Schierholtz, who had been sidelined with a right hip flexor, struck out pinch-hitting in the eighth. ... Marlins CF Mike Cameron (knee) was scratched from the starting lineup. ... Florida RHP Javier Vazquez returned from Puerto Rico, where his wife was ill, and he'll start Saturday. RHP Chris Volstad, recalled from Triple-A New Orleans, will make his first start since July 22 on Sunday. ... Giants RHP Tim Lincecum, scheduled to start Saturday, is 5-4 with a 1.67 ERA over his past 10 starts.