MIAMI (AP) Jorge Alfaro had a career-high four hits and the Miami Marlins handed the San Francisco Giants their seventh consecutive loss with a 4-2 victory Wednesday night.
Neil Walker had a tiebreaking, pinch-hit double in the seventh and Starlin Castro hit the first triple of the season for the Marlins, who have won nine of 12.
San Francisco's Madison Bumgarner (3-5) allowed two runs and six hits in six innings.
Brandon Belt hit his eighth home run of the season and drove in both runs for the Giants.
Marlins starter Pablo Lopez allowed four hits and one run in six innings. Nick Anderson (2-2) pitched a scoreless seventh while Sergio Romo escaped the ninth for his 11th save in 12 chances after allowing a sacrifice fly to Belt and leaving runners stranded at the corners by striking out Steven Duggar to the end the game.
Walker hit a double down the right-field line off Mark Melancon, scoring Alfaro, and Garrett Cooper added a sacrifice fly in the seventh extending the lead to 3-1.
Castro led off the eighth with a triple to center when Steven Duggar's diving attempt came up empty and the ball rolled to the wall. Castro scored on a base hit by Harold Ramirez for a 4-1 lead.
Castro gave the Marlins an early lead with a sacrifice fly and Belt tied it with a home run to right-center.