Police say they were threatened while responding to an unruly party on Murray Lane in Coram on Saturday night.
Officials tell News 12 they were called to the neighborhood at around 10 p.m.
They say some of the partygoers started throwing various objects at responding officers and yelling threatening comments against law enforcement over a loud speaker.
Suffolk Police Commissioner Tim Sini praised police for getting the situation under control.
"Those comments were made and that's one of the reasons why it was important that we get the situation under control," said Sini. "The officers did a wonderful of job of de-escalating and ending that unruly party."
It took officers about three hours to disperse the crowd.
No arrests were made and no one was injured.