MIAMI -- The San Francisco Giants batted around twice in the first four innings, outscoring the Miami Marlins, 14-10, Friday night at Marlins Park.
The two lowest-scoring teams in the National League combined to produce 24 runs and 35 hits.
The Giants, who set their season highs in runs scored and hits, are trying to reverse a couple of negative trends.
Since May 14, they are 31-52, the worst record in the NL in that span.
San Francisco also lost three of four to the visiting Marlins in June. Even with Friday's win, the Giants are just 6-12 against the Marlins since 2012.
On Friday, the Giants battered Marlins' starting pitcher Nate Eovaldi, who lasted just three-plus innings, his shortest outing since Aug. 24, 2012. Eovaldi (2-3) allowed 12 hits and 11 runs, both career highs.
Giants' starter Chad Gaudin lasted just four innings, allowing a career-high 11 hits, four walks and eight runs. Gaudin, a big-leaguer since 2003, tied his previous high in runs allowed. He got a no-decision, and the win went to reliever Sandy Rosario (3-0).
The Giants padded their lead with a two-run seventh inning, highlighted by a run-scoring triple by Hunter Pence.
There was a scary scene in the eighth inning, when Marlins' third baseman Placido Polanco was hit in the batting helmet by a Santiago Casilla fastball. Polanco stayed down for a couple of minutes before being removed from the game.
The Marlins' Justin Ruggiano closed the scoring with a homer in the ninth, his second solo shot of the game.
The Giants led off the game with three straight singles before an error by Marlins' shortstop Adeiny Hechavarria led to a pair of runs. Pablo Sandoval's two-run double gave the Giants a 4-0 lead after the first half-inning.
Another Marlins' error -- this time a backhanded fielding attempt by first baseman Logan Morrison that came up empty -- contributed to the Giants' three-run second inning. Pence cashed in with a two-run double and Sandoval added a run-scoring single.
Eovaldi's one-out single in the third ignited a Marlins' four-run third inning. Morrison's two-run double was the big blow, and Donovan Solano and Polanco added run-scoring singles.
Hector Sanchez, the Giants' backup catcher, hit a three-run homer to spark San Francisco's four-run fourth. It was Sanchez's second homer of the season and his second in his past four at-bats.
Sanchez has nine RBIs for the year, six coming in a span of four at-bats.
The Marlins closed the deficit to 12-5 when Ruggiano hit a solo homer in the fourth. It was his 13th homer of the season and his first since July 3.
Miami got six straight hits to start the fifth inning, producing four runs. Ruggiano hit a two-run double, and Christian Yelich and Solano added run-scoring singles to make the score 12-9.
NOTES: The Marlins on Friday called up 26-year-old RHP Arquimedes Caminero, who has spent eight years in the minors. The 6-foot-4, 255-pound Dominican had Tommy John surgery in 2011 but is back throwing between 96 and 100 mph and will be used out of the bullpen. He was 5-2 with a 3.61 ERA in Double-A Jacksonville this year. ... Giants OF Angel Pagan, out since late June due to a hamstring injury, was set to play in his first rehab game Friday night in Arizona. The Giants hope he can return to them by Sept. 1.