SAN FRANCISCO Miguel Rojas followed Lewis Brinson's RBI single with a go-ahead base hit as the Miami Marlins rallied in the ninth inning and overcame an early four-run deficit to beat the San Francisco Giants 5-4 on Monday night.