Emmanuel Burriss scored the winning run on a wild pitch in the bottom of the ninth inning, giving the San Francisco Giants a 4-3 victory over the Florida Marlins 4-3 on Thursday.

Burriss drew a one-out walk off closer Kevin Gregg, stole second and took third on a fly out. Pinch-hitter Bengie Molina was intentionally walked to set up a possible double play, but Gregg's first pitch to Fred Lewis skipped past catcher John Baker, allowing Burriss to score standing up.

Brian Wilson (2-2) pitched a scoreless ninth for San Francisco, which won for the fourth time in five games. Wilson also got the win Wednesday when the Giants also beat the Marlins in the final inning.

San Francisco improved to 19-13 against the NL East, the only division the Giants have a winning record against this season.

Dan Uggla hit his 27th home run for Florida in the second but cost the Marlins another run when he ran through the stop sign of third base coach Bo Porter. He was thrown out easily at the plate while trying to score on Josh Willingham's double in the fourth.

The Marlins also missed a chance to score in the eighth when San Francisco reliever Tyler Walker walked two consecutive batters to load the bases before striking out Cody Ross to end the threat.

Gregg (6-6) took the loss for the second time in three appearances.

The Giants trailed 2-0 when Pablo Sandoval singled, took second on a groundout and scored on Eugenio Velez's RBI-single in the fourth. Ryan Rohlinger's triple to right-center scored Velez, but he was later thrown out at the plate when Palmer missed on a squeeze bunt attempt.

San Francisco took a 3-2 lead on Aaron Rowand's RBI single in the fifth, but Florida tied it when Ross doubled and scored on Luis Gonzalez's sacrifice fly in the sixth.

Giants starter Matt Palmer pitched effectively, allowing two runs and six hits over six innings, but was denied his first career victory when San Francisco's bullpen failed to hold the lead. The right-hander, who gave up six runs in 2 1-3 innings in his major league debut against Atlanta on Saturday, lowered his ERA from 23.14 to 8.64.

Florida's Josh Johnson also worked six innings and left after being tagged for nine hits and three runs. The Marlins won each of the first six games Johnson started this season but have lost in his last two appearances.

Notes:@ Palmer recorded his first major league hit with a single off Johnson in the third. ... During the game Comcast broadcast a short tribute to American beach volleyball gold medalist Misty May-Treanor, wife of Florida catcher Matt Treanor.