NEW YORK (AP) — Advocates for people with mental illnesses urged a federal judge Thursday to stop New York City Mayor Eric Adams’ plan to force people from the streets and into mental health treatment.

They told Judge Paul A. Crotty in a court filing that the policy Adams announced on Nov. 29 dangerously expands an unlawful city policy permitting the involuntary detention of individuals who seem to have a mental illness.

Several organizations, including the New York Lawyers for the Public Interest and the National Alliance on Mental Illness of NYC, said action was needed to stop large scale involuntary hospitalizations.

The court filing included an account of one individual plaintiff who said that since the mayor’s announcement, he has lived in constant fear that he will be forcibly hospitalized again after suffering involuntary hospitalizations at least three times in the past.

Matt Kudish, chief executive of the National Alliance on Mental Illness of NYC, said in a release that the request was made in a year-old lawsuit challenging the New York Police Department’s role responding to people with mental illnesses. The lawsuit seeks to remove police officers as first responders for those requiring health care.

“We felt the need to take further legal action to halt sweeping involuntary hospitalizations and prevent further harm towards New Yorkers living with serious mental illness and their families,” Kudish said.

The city’s law office defended the plan in a statement released by a spokesperson.

“Mayor Adams’ compassionate plan to connect New Yorkers with severe mental illness to support and care, fully complies with federal and state law, and we look forward to making our case before the court,” the statement said.

No court hearing was immediately scheduled in the matter.

Marinda van Dalen, an attorney with New York Lawyers for the Public Interest, said: “New York City’s reliance on the police as first responders when someone is experiencing a mental health crisis has already resulted in police killings of too many people, the majority of whom are Black or other people of color.”

When Adams announced his plan at a news conference, he said he had directed police and city medics to be more aggressive in getting severely mentally ill individuals off the streets and subways and into treatment.

He called it a “moral obligation to act.”

But civil rights groups and advocates for the homeless said the mayor was likely to trample on New Yorkers’ rights while using a strategy that had failed in the past.

State lawmakers have been considering legislation to widen diversion programs for the mentally ill, a move supported by public defender groups.