MIAMI (AP) -- 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."
Tyler Walker (2-3) gave up a double to Helms to open the ninth, then gave way to Brian Wilson, who issued consecutive two-out walks. 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 win for the Marlins after earning his 10th save in their 8-6 victory in the opener.
Jorge Cantu hit a solo homer in each game and drove in four runs for the Marlins, who had four homers total in their Game 1 victory. Jeremy Hermida and Cantu hit back-to-back shots, and Uggla and Cody Ross also went deep in that one.
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, driving in five runs.
Uggla was the center of the attention in the first game, becoming the first Marlins player to hit 12 home runs in May when he hit a two-run shot in the fifth off Patrick Misch to give Florida a 7-5 lead.
"I was just looking for something to hit and I put a good swing on it," he said. "I'm just glad it carried out."
Mark Hendrickson (7-2) got through five shaky innings, giving up five runs and nine hits, to win for the seventh time in his last nine starts for the NL East leaders.
Misch (0-1) remains winless in 25 major league appearances, including nine starts, over the past three years. He gave up seven runs and seven hits, including three homers, and was pulled after 4 1/3 innings.
"I really wasn't in control of too many pitches," he said. "It all kind of ballooned on me."
After Molina's two-run double helped give the Giants a 5-3 lead in the third, the Marlins came back in their half. Misch issued a bases-loaded walk to Luis Gonzalez, then was called for a balk, allowing Cantu to score.
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 homer 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 homers 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.