According to authorities, nearly 100 people were attending a house party at a home near 130th Avenue and 219th Street in Laurelton.
Plainclothes officers were observing the party in an unmarked car, as they believed there was the potential for violence.
At around 11:35 p.m., as the officers were watching, a group of men arrived at the party, pulled out at least three firearms, and opened fire on the party-goers.
Upon seeing this, the officers got out of their car and exchanged gunfire with the suspects.
The detectives managed to apprehend three of the gunmen. Three firearms were also recovered from the scene.
Four people were reportedly shot and one is in critical condition. It is currently unknown if the gunshot victims were party-goers or suspects, or if they were shot by police or by the gunmen.
None of the officers were injured in the gunfight, although they were taken to a nearby hospital to be checked for tinnitus.
An investigation is ongoing, and police say they are still seeking more suspects.