NEW YORK (CBSNewYork) — A man was shot in the leg by police late Friday night after he allegedly exchange gunfire with officers in Brownsville, Brooklyn.

Assistant Chief Jeffrey Maddrey said three detectives with the NYPD Brooklyn North Gang Squad were driving south on Sutter Avenue in an unmarked vehicle around 10:45 p.m. when they saw a black Lexus sedan stop in front of 656 Howard Avenue, where a large group was assembled.

The driver, who was later identified as Kowon Davis, 44, of the Bronx, got out of the Lexus armed with a gun and motioned to the group, police said.

The detectives got out of their vehicle and gave the command “police, don’t move,” Maddrey said.

Davis then turned to the detectives and fired his weapon, police said. Gunshots were exchanged and the man fled on foot before being taken into custody less than a block away between Howard Avenue and Grafton Street, according to authorities. 

Police recovered a gun from the scene.

Davis was shot in the leg. He was taken to Brookdale Hospital in stable condition.

The officers were unharmed, but they were taken to Jamaica Hospital as a precaution.

Davis was arrested and charged with criminal possession of a weapon and menacing a police officer.