Alaska Psychiatric Institute’s three remaining psychiatrists have all put in notice to quit, one of the doctors testified at a court hearing in Anchorage on Wednesday.

Dr. Deborah Guris testified that after the beginning of April, she will be the last psychiatrist on staff at the troubled public psychiatric hospital, which the state moved to privatize in February. Wellpath, the company the state gave the contract to, is supposed to take over full operation of the facility on July 1.

Guris then said her own last day will be May 3.

“I don’t want to abandon my patients, but I also do not want to work somewhere that I can’t ethically care for my patients,” she said.

Guris was testifying at a hearing related to a lawsuit over a problem that has existed since last fall, and appears to be only getting worse: People in psychiatric crisis are being warehoused in emergency rooms and jail cells for weeks — or in a few cases, a month — because API doesn’t have the capacity to admit them but they have been deemed too sick to be released.

In October the Alaska Disability Law Center and Alaska Public Defender Agency filed suit in Anchorage Superior Court, asking a judge to make the state immediately stop housing people subject to civil commitment orders in jail — and either quickly provide mental evaluations required by law at the hospitals where the people are being held, or release them, according to court filings. The two cases were combined by the court.

The Disability Law Center has also asked that people subject to civil commitment orders are “immediately notified of their rights, provided a copy of the order authorizing their detention and given the contact information for their court-appointed attorney,” according to attorney Joanna Cahoon.

A five-day hearing that kicked off Tuesday allows the plaintiffs and the defendants, the state of Alaska, to present their cases. Anchorage Superior Court Judge William Morse is expected to rule next week.

Witnesses, including executives from local hospitals and API itself, spent hours Tuesday and Wednesday describing Alaska’s rickety infrastructure for dealing with people in a serious psychiatric crisis.

The testimony illuminated new and startling facts about the depth of the chaos at API — and the fact that by some measures, things have gotten worse instead of better in the last few months.

Guris testified that at the beginning of December, API had six psychiatrists.

Two were fired by the administration of Gov. Michael Dunleavy after they refused to submit required letters of resignation. Another resigned in early January. That left Guris and two other medical doctors, Dr. Andrew Pauli and Dr. Lee Ann Gee.

Both Gee and Pauli will be leaving in early April, Guris said.

Meanwhile, officials testified, alarming wait lists are stacking up, leaving vulnerable, mentally ill people stuck in places like jail or a hospital emergency room.

Tom Price, the director of the emergency department at Alaska Regional Hospital, testified Monday that his ER has been flooded by people in psychosis, with up to four people coming in per day, either on their own or brought by police.

By law, they are supposed to be sent to a “designated evaluation facility,” where a medical professional is supposed to meet with them and decide whether they meet the legal standard to be forced into a psychiatric hospital.

But because API has a long waiting list, most of those patients have no choice but to wait for days or weeks in an emergency room not designed to care for them. The patients are not free to leave the hospital while they wait, Price said.

While they wait, people are often confined to small ER rooms. They get to talk daily to a social worker located in Utah on a Skype-like apparatus, he said.

As of Wednesday, there were 36 people waiting to get into API, testified Mark Kraft, the director of social work at the hospital. Six were waiting in jail.

And testimony also revealed that an exodus of psychiatrists from API has caused the number of patients the hospital can handle to sink even lower.

In December, the hospital had around 40 patients, Guris testified. By Wednesday, the number had plunged to just 27 of 80 possible beds occupied — the lowest-ever patient census, Kraft testified.

Only 18 of those patients were civilly committed. The rest were criminal defendants ordered to be restored to competency by the court.

Guris said that the low bed availability in December had more to do with nursing staff shortages. Now, it has everything to do with the missing psychiatry staff, Guris said.

API has been trying to recruit psychiatrists for eight months without success, Guris said.

“There’s a national shortage of psychiatrists,” Guris said. “Hiring psychiatrists anywhere in the U.S. is going to be difficult.”

“Wellpath’s team of 40+ dedicated healthcare recruiters is working with API to retain existing psychiatrists and to identify, recruit, and hire qualified professionals to vacant psychiatric positions,” Wellpath senior vice president Jeremy Barr said in an email.

It takes months for an out-of-state psychiatrist to be licensed and credentialed to work in Alaska, Guris said.

What’s going to happen when the last psychiatrist leaves in May? The number of patients API can handle is likely to sink even lower, Kraft said.

An attorney asked: Does Wellpath have a plan?

“I hope so,” he answered.