A federal judge in New York declined to jail a leukemia-stricken ex-convict who said he got himself arrested in order to get health care in prison, according to a report.

The Buffalo News reports that Magistrate Judge H. Kenneth Schroeder Jr. refused a request from a federal prosecutor to jail Frank J. Morrocco, a 56-year-old Amherst man who was arrested in November for stealing $23 worth of items from a supermarket.

Schroeder instead ordered Morrocco — who was convicted of felony drug conspiracy charges in the 1990s and was released last year after serving two decades — to visit Roswell Park Cancer Institute to apply for health care coverage under a program run by New York State, the newspaper reports.

“I’ll take him down to Roswell as soon as possible, and hopefully, he’ll be admitted to the program and get the treatment he needs,” Morrocco’s attorney, Joel Daniels, told the newspaper.

Calls seeking comment from Daniels were not immediately returned. Attempts to reach Morrocco were unsuccessful.

Morrocco told The Buffalo News he stole “junk items” from a Wegmans supermarket on Nov. 26 in hopes of a return to prison, where he received “very good” health care. He now faces a federal charge of violating the terms of his five-year supervised release, the newspaper reports.

Social workers at Roswell Park told Daniels that Morrocco can receive health care for roughly $360 monthly under the “New York Bridge” program, he told the newspaper.

Morrocco, meanwhile, who works as a private contractor, will receive help from his mother and friends until he can afford to make the payments himself.

Schroeder ordered Morrocco to appear in federal court again on Dec. 19 for an update before U.S. District Judge John T. Curtin, who handled Morrocco’s original drug case.