Twelve San Francisco officers were injured early Tuesday morning while trying to disperse a large, hostile crowd that was throwing bottles and fireworks at them.

Officers ordered the people to leave due to the risk to public safety and property, police tell NBC Bay Area. According to police, members of the crowd proceeded to throw glass bottles and fireworks in the direction of the officers.

The 12 injured officers experienced ringing in their ears and two also sustained minor burns from debris from an exploding device, police say.