NEW YORK — A senior judge who navigated her Manhattan-based court through the covid-19 crisis has denounced as "inhuman" the conditions inside New York's federal jails, complaining at the sentencing of a woman who spent months in solitary confinement after contracting the coronavirus that the facilities are "run by morons."

U.S. District Court Judge Colleen McMahon castigated the Federal Bureau of Prisons, saying the agency’s ineptitude and failure to “do anything meaningful” at the Metropolitan Correctional Center in Manhattan and the Metropolitan Detention Center in Brooklyn amounted to the “single thing in the five years that I was chief judge of this court that made me the craziest,” according to a transcript of last month’s proceeding obtained by The Washington Post on Friday.

McMahon stepped down from her judicial leadership role in the Southern District of New York weeks before Tiffany Days’s virtual sentencing April 29. But while in her capacity as chief judge, McMahon coordinated the district’s response to the pandemic, including modified trial procedures, safety protocols for jurors and remote court proceedings.

Days, 40, had been housed in the Metropolitan Correctional Center — the same facility where, in 2019, sex offender Jeffrey Epstein committed suicide while awaiting trial, a scandal that brought scrutiny to the Bureau of Prisons’s oversight of New York’s federal detention facilities. In those problem-plagued jails, McMahon said, wardens “cycle repeatedly, never staying for longer than a few months or even a year.”

The judge told Days, who pleaded guilty to conspiracy to distribute and possess MDMA and cocaine, that she would have released her — suggesting the torment she faced in pretrial custody was punishment enough — but had to issue a minimum five-year prison sentence under the law.

In a statement, the Bureau of Prisons said it “takes seriously our duty to protect the individuals entrusted in our custody, as well as maintain the safety of correctional staff and the community.” The statement also noted that the American Correctional Association evaluates the agency “for compliance with a broad array of correctional standards, including sanitation and hygiene.”

Days’s attorney Xavier Donaldson told McMahon that his client was kept in solitary confinement, usually reserved to punish people who misbehave in jail, for 75 days after she contracted the coronavirus. Days, however, had a spotless disciplinary record during her time there, her lawyer said.

Donaldson argued at the sentencing that the Metropolitan Correctional Center is not “a good look for America.”

“Its treatment of its prisoners, the inmates, in the last 14 months have been nothing short, in my opinion, of inhumane, cruel and harsh, and unreasonably unjust,” he added.

Days, whose time in the facility overlapped with Epstein’s, also endured multiple lengthy lockdowns — after Epstein died, after a firearm was found in the facility and when protests erupted following George Floyd’s death while in police custody. During the gun lockdown, women had no access to water or sanitary napkins, she told the court.

Days, according to the transcript, said she and other inmates were ordered to clean a “disgusting feces flood,” telling the court in horrifying detail how some vomited from the stench as sewage with floating bugs and mice reached their ankles. Her time in both facilities produced “the most degrading and humiliating memories of my life” — enough to keep her law abiding for good, she said.

“Everything I suffered, everything I shared in this horrific place will be a reminder and strength to me to do the right thing,” she added, according to the transcript. “My incarceration has been very painful.”

The judge echoed her sentiment.

“It is the finding of this court that the conditions to which she was subjected are as disgusting, inhuman as anything I’ve heard about any Colombian prison, but more so because we’re supposed to be better than that,” McMahon said.

The Bureau of Prisons has come under fire for what advocates say has been a massive failure to protect inmates in a high-risk setting from exposure to the deadly virus. To date, more than 45,000 inmates have contracted the coronavirus, according to data maintained by the agency. More than 200 inmates and four BOP staff members nationwide have died.