Updated

San Francisco, CA (SportsNetwork.com) - Ryan Vogelsong tossed seven strong innings to lead the San Francisco Giants in a 4-1 win over the Miami Marlins to split a four-game set.

Vogelsong (2-2) gave up just five hits and a walk with six strikeouts for the Giants, who won the opener of this series before dropping the next two.

"He's been throwing the ball well," said San Francisco manager Bruce Bochy about Vogelsong. "His last start he should have fared better and he carried that stuff into today's game. The key from him is he threw early strikes and quality strikes."

Pablo Sandoval hit a solo home run, while Buster Posey, Tyler Colvin and Brandon Hicks each drove in a run in the win.

Jacob Turner (0-2) gave up four runs on six hits with a walk and seven strikeouts over six innings for the Marlins, who went 4-7 on a season-high 11- game road trip. Christian Yelich drove in Miami's only run.

"I was very happy with the effort with the way we played these last four games," said Miami manager Mike Redmond. "We had a pretty rough start to this road trip and I'm pleased with the way we played against a great ball club here."

The Giants jumped on top in the first inning as Gregor Blanco started off the frame by getting hit by a pitch. He then stole second and moved to third on a Hunter Pence groundout before coming home on Posey's sacrifice fly.

Pablo Sandoval then singled and Michael Morse followed with a base hit. Consecutive singles from Colvin and Hicks brought home two more runs for a 3-0 lead.

Miami stranded runners on second and third in the fifth as Adeiny Hechavarria grounded out to end the frame, and Sandoval made it a 4-0 game with his two- out solo homer in the home half.

The Marlins worked a run across in the eighth off Jeremy Affeldt as Hechavarria singled, moved to third on Derek Dietrich's double and scored on a Yelich groundout.

Santiago Casilla then took the mound and gave up a single to Casey McGehee to bring the tying run to the plate, but struck out Garrett Jones and induced a fly out from pinch-hitter Giancarlo Stanton.

Sergio Romo tossed a scoreless ninth inning for his 15th save of the season.

Game Notes

Pence played in his 351st game and he is the new active leader in consecutive games played. Texas Rangers first baseman Prince Fielder was the previous leader, but had his streak snapped on Saturday at 547 consecutive games after not playing due to receiving an injection for a herniated disk in his neck ... The Giants hit the road for three games in Colorado starting on Tuesday ... Miami heads home to face Philadelphia for three games beginning on Tuesday.