An off-duty NYPD officer shot and killed another man who reportedly attacked him after a traffic dispute early Monday in Brooklyn, police said.

After narrowly avoiding a crash in Cypress Hills on Atlantic Avenue at Bradford Street, a man, identified as Delrawn Small, got out of his 2016 Kia EX and approached a 2002 Nissan Altima, driven by an off-duty NYPD officer whose name has not been released, while the two were stopped at a red light, the New York Daily News reported.

Small, 37, repeatedly punched the officer in the head through his car window shortly after midnight, according to police.

The officer drew his weapon and fired an unknown number of times at Small, who died at the scene, NBC New York reported.

The officer was taken to Jamaica Medical Center; he is expected to recover.

Small's relatives, who were at the scene of the shooting, said they have hired an attorney.

Small's brother, Ali, said the victim was visiting his girlfriend, their newborn baby and her two teenagers, NBC New York reported.

News outlets have reported that Small's family was in the car at the time of the shooting.

The officer involved in the apparent road rage incident is reportedly assigned to the 79th Precinct in Bedford-Stuyvesant and is a three-year veteran of the NYPD, according to ABC7.

A previous version of this article incorrectly identified Delrawn Small as Delron Dempsey.