An off-duty police officer shot and killed a man during an apparent road rage incident in Brooklyn early Monday morning, the NYPD said.

According to investigators, the off-duty officer was driving east on Atlantic Avenue near Bradford Street just after midnight when he was involved in a traffic dispute with another driver.

Police said when both cars stopped at a red light at Bradford Street, the 37-year-old driver of the other vehicle got out and began to punch the off-duty officer, who has just ended his work shift, in the head through the open window of the officer’s vehicle.

During the altercation, police said the off-duty officer discharged his service weapon, striking the man in the head.

EMS personnel responded to the scene and pronounced the man dead, police said.

The off-duty officer, who a law enforcement source said works in the 79th Precinct and has been on the job for three years, was taken to Jamaica Hospital Medical Center for treatment of contusions to his head.

A law enforcement source identified the man who was killed as Delrawn Smalls. The source said Smalls had 19 prior arrests.

The NYPD and the state Attorney General’s office is investigating the incident, Commissioner Bill Bratton said. “There’s a protocol of Force Investigation Division ... a very comprehensive police investigation. We’re gathering a lot of video from the area,” Bratton said.