MIAMI -- With plenty of rest and enough run support, All-Star Tim Hudson got his second half off to a winning start.
"He was sharp, I'm sure the added rest probably did benefit him," Giants manager Bruce Bochy said.
Hudson (8-6) came into the game with just five runs of support in his last five starts, but the Giants jumped out to a 5-1 lead in the fourth inning, which was enough for the 39-year old veteran.
He allowed one run and eight hits in 7 1/3 innings. He struck out three and did not walk a batter while throwing 52 of his 81 pitches for strikes.
"Obviously, this time of year, extra rest is usually welcomed," Hudson said.
Hunter Pence drove in two runs and Pablo Sandoval had three hits for the Giants, who have won four of five. They are 54-43, the best record in the National League.
"I'm proud that we are in first place," Sandoval said.
Giancarlo Stanton hit his National League-best 23rd home run for Miami, which has lost six straight. It was his second home run in two days after not hitting one for three weeks.
"That's good, back-to-back homers," Marlins manager Mike Redmond said. "Hopefully that gets him going. We definitely need him. He's the guy, so it's good to see him have a couple big at-bats and a couple home runs."
Marlins All-Star starter Henderson Alvarez (6-5) departed with a bruised left shin after being hit by a grounder by Joe Panik in the third. Alvarez threw out Panik at first before limping off. X-rays were negative and he plans on making his next start on July 24.
"It got me in between the bone and the flesh," Alvarez said. "It got me pretty good. Luckily I'm fine, just a bump. I anticipate on making my next start. We have to give it a couple days to see how it heals, but as of now I'm looking to pitch in Atlanta."
Sergio Romo allowed a home run to Stanton to lead off the ninth and departed after allowing a two-out double to Marcell Ozuna. Jarrod Saltalamacchia hit an RBI single off Santiago Casilla to pull the Marlins within 5-3, but Adeiny Hechavarria lined out to end the game as Casilla picked up his fifth save in eight opportunities.
Giants first baseman Brandon Belt left the game in the third due to dizziness, but not before hitting an RBI double. Belt was struck by a ball in the face during batting practice when two balls were thrown at him at the same time.
"He seemed OK," Bochy said. "Of course he had the big hit to get us going and then he started complaining of headaches, got a little nauseous, dizziness."
Belt will be held out of Sunday's game and will be given a concussion test.
Miami trailed 2-1 when Alvarez left the game and was replaced by Sam Dyson. Dyson was sharp in his first inning of work before allowing three runs in the fourth, which included hitting a batter and walking two. His bases-loaded walk to Hudson gave the Giants a 3-1 lead. Pence stretched the lead to 5-1 with a two-run single.
Casey McGehee had an RBI single in the first to give the Marlins an early lead.
Marlins 2B Jordany Valdespin went 1 for 4 in his season debut after being selected from Triple-A New Orleans. ... Hudson is 15-4 in his career against the Marlins including an 11-1 mark in South Florida. ... The Giants will send RHP Tim Lincecum (9-5, 3.66 ERA) to the mound in Sunday's series finale against LHP Brad Hand (0-2, 5.26). Lincecum is 4-0 with a 0.30 ERA since June 25.