Dennis Deska was agitated last July 4. The day had started off badly, at a diner in Feasterville, when a confrontation with a stranger left Deska sprawled on the floor, with a bloody gash in his head. He left, but later came back — yelling something about the FBI in Texas — and picked up a flowerpot and hurled it at the window.

When police arrived, he struggled and tried to flee, and ended up backing into a police car.

He was charged with aggravated assault and other crimes, and bail was set at $350,000. But Deska, who has had bipolar disorder with periods of psychosis since he was a teenager, never had a preliminary hearing.

“It was recognized by everyone that he was out-of-his-mind psychotic, so from the moment he was in there, he was put in a cell by himself — for his own protection,” his sister, Marjorie Deska, said.

Dennis Deska, 58, of Doylestown, has remained in the Bucks County Correctional Facility for close to 10 months — except for frequent emergency trips to the hospital for chronic kidney failure, sepsis, and pneumonia.

His family blames the jail and the state Department of Human Services, which, under a settlement with the ACLU, has struggled to reduce wait times for care at Norristown and Torrance State Hospitals — the only remaining state forensic psychiatric hospitals in Pennsylvania, where people with serious mental illnesses are cared for until they are competent for trial.

Those hospitals will not accept individuals with acute medical needs such as Deska, which means they’re effectively stranded in jail.

“The prison knew that, as Dennis’ physical condition worsened, he would not be able to go to Norristown, and they made no effort to expedite him,” Marjorie Deska said. Instead, he was repeatedly discharged from the hospital back to jail, where his wounds became infected, sending him back to the hospital again. He was finally scheduled to be admitted to Norristown in March but came down with pneumonia the night before. “They said they won’t take him because of his medical condition. We have nowhere to take him now,” she said.

Dennis’ plight is not unique, according to Witold Walczak, legal director of the ACLU of Pennsylvania, which filed a class-action lawsuit in 2015 when wait times for the state hospitals stretched in some cases close to two years. “A combination of a medical problem on top of a severe mental illness creates problems, because there seems to be no place in the state for DHS to treat these people,” Walczak said.

A spokesperson for the state Department of Human Services said that while care is available for those with chronic conditions — cancer, heart disease, diabetes — defendants requiring acute medical care won’t be accepted at Norristown.

“If a condition is not stable and requires immediate attention, the individual cannot be admitted to a state psychiatric hospital,” the spokesperson, Ali Fogarty, said in an email.

Fogarty suggested a hospital with a psychiatric unit might be a more appropriate setting. But Marjorie said she called about 30 such facilities, and each one told her they could offer only short-term, emergency psychiatric care. She’s run out of ideas.

Chris Pirolli, director of corrections for Bucks County, refused to comment. Messages left at the county correctional facility were not returned. But Bucks County Commissioner Diane Ellis-Marseglia said the jail staff had done all it could — but was up against a larger system failure.

“This is a problem that is plaguing county jails all over the country," she said. “This is not the only instance where a person with mental illness has been put in jail because they closed all the mental hospitals back in the ’80s."

Though DHS said the wait list for Norristown is down to just 34 days — compared with as long as 600 days just a few years ago — Ellis-Marseglia said the county has struggled to expedite any given individual into treatment.

“We’ve got at least 30 people on the ‘please, we want to expedite this person’ list,” she said.

Fogarty denied that and said only two people in the county prison are awaiting treatment.

According to the ACLU, courts have ruled that a wait of longer than seven days for hospitalization is unconstitutional.

Though Ellis-Marseglia said it’s up to state and federal lawmakers to solve the problem, it’s the district attorney who has the ability to address cases involving mental illness as they arise.

“I would like to see the district attorney step in on Day One on these things — there’s no reason to hold someone in jail from Day One with this mental illness,” she said.

Rose McHugh, an assistant district attorney handling the case, said the office is working with the public defender and court toward resolving the case. “He does have two different, separate offenses involving two different police departments. The charges in this case are serious and, as in any criminal prosecution, we need to balance the defendant’s needs and the need to protect the community,” she said.

But even if the case is resolved, it’s not clear where Dennis might end up.

The ACLU’s Walczak said he’s been dealing with a similar case in Pittsburgh, with a defendant who has severe medical and mental health issues. A year in, the district attorney is willing to drop the charges in that case.

“Under the law, our guy is entitled to release, because he’s being held illegally in jail,” he added. But he’s a danger to himself, so he can’t be safely released. “There apparently just aren’t placements.”