SAN FRANCISCO -- A few bad pitches here and a couple of unlucky bounces there, and suddenly a would-be blowout turns into a ballgame.
With the Marlins -- and Dan Uggla in particular -- able to launch a home run at any moment, no lead is safe, no matter the size.
Andres Torres ended a roller-coaster Wednesday in fine form -- capping off a 4-for-6 performance with a game-winning RBI single in the bottom of the 10th to give the Giants a 10-9 win.
San Francisco went from a four-run lead in the first to a 9-2 lead in the seventh to extra innings.
It was there where the Giants finally put away the Marlins thanks to their do-everything center fielder and leadoff man who continued his breakout season. Torres also launched a home run into McCovey Cove.
"I've said this since he's been at the top of the order, ever since he's been up there -- to me, he's been our MVP and spark plug," Aubrey Huff said of Torres. "He gets on base two times a night, we're going to win most games; he's just been that good."
Buster Posey also extended his hitting streak to 21 with a single in the third inning. It's the longest streak in the National League this season and tied for the second longest in the Majors.
Rookie hitting streaks of 20-plus games
Torres, the NL leader in doubles, also went 3-for-4 on Tuesday and is hitting .287 with 10 homers and 41 RBIs.
The past two days, Torres said he spent time getting hitting advice from former Giants great and current special assistant Will Clark, who told him to focus on staying through the ball longer.
That advice, coupled with the work Torres has done throughout his career, has him playing the best ball of his career.
"It took me a long time to learn how to hit, and it's hard. Hitting is one of the toughest things," Torres said. "But a lot of people have helped me and I always try to learn something every day and ask all the guys, like Will or anybody, a lot of people have helped me in my career and I feel great right now."
So, too, are the Giants, who somehow managed to win for the 17th time in the past 21 games despite blowing their big lead.
They scored seven runs in the first three innings, knocking Florida starter Alex Sanabia out of the game in the third. Torres' two-run homer in the sixth seemed to be just a few more insurance runs.
But the Marlins found the long ball in the fifth, with Donnie Murphy hitting a pinch-hit, three-run homer to knock Giants starter Jonathan Sanchez out of the game.
With two out, Florida first baseman Gaby Sanchez struck out but reached on a wild pitch, and Uggla drilled a two-run shot to left to bring the Marlins within two.
Giants closer Brian Wilson entered in the ninth, but Logan Morrison hit an RBI single and Uggla followed with a run-scoring ground-rule double to tie the game.
"I was going to give him my best pitch and as of late it's been fastball up," Wilson said. "But he's seeing the ball well -- always has against us -- got my good pitch. You have to tip your cap."
Uggla, who's hitting .321 in his career against the Giants, has hit homers in five of his last six games. He said he was expecting the heater.
"I had a feeling, Wilson is one of those guys, in that situation, if you're going to get him, he's going to give you his best stuff," Uggla said. "He threw me a high, hard fastball. It's a good thing, I started a little early."
With one out in the 10th, Aaron Rowand, Edgar Renteria and Nate Schierholtz singled consecutively before Torres came through with the game-winner.
"That's a playoff team right there, to be able to come back in a situation where you have the game in hand and be able to battle back shows heart, to be able to gut it out," said Huff, who went 2-for-3 and recorded his 1,500th career hit. "I've never been a part of a team like this, I know that."
Cash Kruth is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.