The incident began after police responded to a noise complaint at a house party at Carlton Drive East near Startler Drive.
Officers were called after neighbors heard a man yelling and firing a weapon.
According to the Suffolk County Police, when police approached the rear of the home, a man came to the door armed with a shotgun and began firing at the officers.
The officers returned fire and took cover.
Police say the man retreated into the house and several minutes later he exited the home by the front door and fired a rifle at officers in the street.
Officers returned fire and struck the shooter, who was pronounced dead at the scene.
Authorities say the shooter, who was wearing a helmet and a ballistic vest, had fired at least 15 rounds at police.
Detectives believe they know the identity of the shooter but have not yet been able to locate next of kin
Detectives also say the man was yelling something about Mayor Michael Bloomberg when they confronted him.