The Suffolk County officers were responding to a call of a dispute between two residents at an apartment on Birchwood Road in Medford around 5 p.m. when one of the men turned a knife on the officers, Suffolk County police said.

The man stabbed and seriously injured two officers.

The man stabbed and seriously injured two officers.

At least one of the cops pulled out their firearm and fatally shot the suspect, police said.

At least one of the cops pulled out their firearm and fatally shot the suspect, police said.

One of the injured officers had to be airlifted to the hospital due to the severity of his wounds, according to cops.

Both officers were taken to Stony Brook University Hospital for treatment.

Both officers were taken to Stony Brook University Hospital for treatment.

A third officer was also transported for minor injuries.

A third officer was also transported for minor injuries.

Suffolk County Police Homicide Squad detectives are investigating the shooting and the events that led up to it.

The initial 911 call was made by a case worker checking on the two residents at the Birchwood Road complex, according to NBC New York.