MIAMI -- Dan Uggla likes batting with the game on the line. His teammates want him up in those situations, too.
"Any situation, any pitcher, any count, he is the guy you want at the plate right now," Wes Helms said. "He's about as locked-in as I've ever seen him."
In the ninth, Tyler Walker (2-3) gave up a leadoff double to Helms, then gave way to Brian Wilson, who issued back-to-back walks with two outs. Uggla hit a sharp grounder up the middle on the second pitch he saw.
"These moments come few and far between. Any time you can do something like that to help your team win, it's one of the best feelings in the world," Uggla said. "It's nice to get a hit and get that guy in and send us off on the road."
The Marlins departed afterward for a 10-game road trip, starting at the New York Mets on Monday.
"I'm extremely tired," Uggla said. "I'll probably be asleep before the plane takes off."
Kevin Gregg (4-2) got the victory for the Marlins.
Jorge Cantu hit a solo home run in each game and drove in four runs for the Marlins.
San Francisco's Omar Vizquel played his 2,584th game at shortstop, breaking the major league record previously held by fellow Venezuelan Luis Aparicio. Vizquel tied the record in the opener and received a standing ovation from the Marlins crowd when it became official after the fifth inning of the second game.
"I was very emotional and very proud," Vizquel said. "I can't enjoy it as much as I might be able to if we won. It was a big moment for me."
Vizquel, whose teammates stayed in the dugout as he took the field for the sixth, tipped his hat to the crowd and bowed to acknowledge the ovation.
"I appreciate them doing that," he said. "I have a lot of friends here in Miami and it made it very special."
The second game was tied at 2 in the fifth when Ray Durham and Aaron Rowand each hit RBI singles off reliever Justin Miller to put San Francisco ahead 4-2. The Marlins tied it again in the seventh on Cantu's two-out, two-run single off Walker.
"The walks are killing us and it hurt us in that last inning," Giants manager Bruce Bochy said. "We walked the pinch hitter (Alfredo Amezaga) and that set up a hot hitter. We had two outs and thought we could get out of it but it didn't work out that way. It makes it a really long day with two losses."
Marlins starter Eulogio De La Cruz, recalled from Triple-A Albuquerque before the second game, left after three innings and 65 pitches. He allowed two runs and two hits while walking four in his first career start.
Cantu's homer in the first inning tied the score at 1, and Florida went back ahead 2-1 in the second on a sacrifice fly by Jacque Jones. The Giants tied the score again in the third when Bengie Molina doubled in Randy Winn.
Molina finished 6-for-7 in the doubleheader with five RBI.
- The first game was halted for 29 minutes in the fourth inning due to rain. Both starting pitchers returned after the delay.
- Vizquel made his first error of the season in the first game.
- To make room for De La Cruz, Florida optioned INF Robert Andino to Triple-A Albuquerque after the opener.
- Rowand's second-inning home run in the first game was the 100th of his career.
- Travis Denker's double for the Giants in the opener was his first major league hit.
- Gary Sheffield had the previous record for most home runs in a month for the Marlins with 11 in 1994 and '96.
- Hendrickson, who started the first game, pinch hit in the second game, striking out.
- Giants starter Matt Cain tossed five innings in the second game, allowing two runs and five hits while fanning six.