Queens prosecutors brought charges Friday against a man who’d been shot by police last month — over the objections of Mayor Zohran Mamdani, and of family members who said the man needed an ambulance, not a confrontation with cops.

Jabez Chakraborty, 22, pleaded not guilty and was held on $50,000 bail over his lawyer’s objections. Chakraborty’s lawyer said he is still bed-bound at Jamaica Hospital.

The charges comes after police body-camera footage released by the city shows he came at officers with a kitchen knife, despite his family’s pleas for him to stop and the officers’ commands for him to drop it before one of them shot him. The case has drawn attention in part because the family has criticized how city workers handled their call for help when Chakraborty was acting erratically, and Mamdani has said Chakraborty needs mental health care, not prosecution.

Chakraborty appeared before Judge Jessica Earle Gargan remotely from his hospital bed, where he is still recovering.

Fahd Ahmed, director of Desis Rising Up and Moving, an advocacy organization for the city’s South Asian and Indo-Caribbean communities, said Chakraborty’s relatives told him about the scheduled appearance late Thursday. Ahmed said the family was “anxious” about the process and didn’t seem to know many details.

“The fact that he is even being considered for arraignment and being [at the time] potentially charged is, again, retraumatizing when the family literally called the EMS,” Ahmed said, referring to emergency medical workers.

“No family should have to endure this kind of pain,” Mamdani said Friday at an unrelated event, reiterating his calls for overhauling the city’s approach to mental health incidents. “What they need right now is care, dignity and support.”

“Jabez should not be prosecuted by the Queens district attorney,” he added. “His handcuffs should be removed and he should be receiving the care that he needs.”

The mayor said last month that he had spoken with the Chakraborty family after the incident and that the 22-year-old has long had schizophrenia.