Elizabeth police say Sharif Tankard of Roselle was among a group of men who were confronted by two detectives inside the Oakwood Plaza housing complex late Friday.
The confrontation soon became physical and Tankard allegedly disarmed one of the detectives.
Tankard was then shot in both legs by one of the detectives. Tankard was taken to a hospital, where he was listed in critical but stable condition.
Tankard faces charges of aggravated assault on police, disarming a law enforcement officer and threatening an officer with the use of that weapon. His bail was set at $500,000 and it was not known Sunday of he has retained an attorney.
The shooting remains under investigation.