NEW YORK (PIX11) — A judge gave New York City just three weeks to work out a plan to improve Rikers in order to avoid a federal takeover.

The decision follows years of problems at the jail facility. United States Attorney Damian Williams made the case for the jail being relinquished to federal control. The city needs to file a detailed plan by May 17, a judge said Tuesday. It’s set to be discussed at a May 24 hearing.

Correction Officers Benevolent Association President Benny Boscio slammed the suggestion of a federal takeover. He feels correction officers should be the ones handling problems at Rikers.

“Contrary to the Federal Monitor’s desire for the DOC to discipline and terminate its way out of the staffing crisis caused by the previous administration, we believe that endeavor will only exacerbate the crisis because there simply aren’t enough officers to backfill the nearly 3,000 officers who have permanently left this agency,” Boscio said. “Furthermore, Legal Aid’s efforts today to convince the Judge to circumvent New York City Civil Service laws and New York State Labor laws in order to accomplish their agenda of eradicating our workforce speaks volumes about their ultimate goal.”

Boscio believes Mayor Eric Adams and Commissioner Louis Molina should be given time to make the necessary changes. Molina told the judge on Tuesday he plans to begin implementing meaningful changes within days to the troubled Rikers Island jail complex.  A spokesperson for the Legal Aid Society said they haven’t seen evidence the city can respond to the Rikers crisis.

“Independent leadership with authority and willingness to enact bold, swift change, such as may be obtained through receivership, is necessary to end this quagmire,” a Legal Aid Society spokesperson said.

The New York City Department of Correction declined to comment on the judge’s decision. A spokesperson referred PIX11 to the Law Department for comment.

“We firmly believe that working with the monitoring team and Commissioner Molina, this administration will be able to create a path forward towards resolving the longstanding issues in the city’s jails,” a Law Department spokesperson said. “We will be working diligently to accomplish the goals we have set.”

The Associated Press contributed to this report.