SACRAMENTO, Calif. — Maggots and mice have fallen onto inmates' dining tables at a California state prison where holes in the roof also allow rain and bird droppings to seep through and streak the walls, according to an inmate lawsuit that charges the state isn't moving fast enough to repair deteriorating prisons.

California has committed $260 million over four years to repair leaking roofs and clear dangerous mold at more than two dozen deteriorating prisons where the cost of overdue maintenance is pegged at more than $1 billion.

The lawsuit calls for swifter action and includes examples of the problems in stomach-churning detail.

A dining hall where damaged ceiling tiles have been removed at the California Substance Abuse Treatment Facility and State Prison in Corcoran, California. Prison Law Office / via AP

Mice twice fell onto the dining table and scurried into a dishwashing area in April 2018, testified inmate Marvin Dominguez, who eats twice a day in the dining hall at the California Substance Abuse Treatment Facility and State Prison in Corcoran. Then a squirmy maggot dropped onto his food tray in October.

A guard advised him to sit at a different table, he said.

The disclosure comes amid increased scrutiny over prison conditions nationally. Other reports include a lack of heat in February in federal detention centers in the New York borough of Brooklyn and near Los Angeles, and poor medical care and dangerous conditions at federal immigration facilities.

Inmate Robert Escareno, who filed the California lawsuit, described in court how bird feces paint the dining room wall. He claims the mold and other contaminants aggravate his allergies.

State officials don't deny the problem but say they're fixing the roofs as fast as they can. They blame inmates for attracting vermin by tossing food and hiding liquor they make known as "pruno" in the damaged ceiling.

The front wall and ceiling of a dining hall where damaged ceiling tiles have been removed at the California Substance Abuse Treatment Facility and State Prison in Corcoran, California. Prison Law Office / via AP

Inmates' attorneys say the Corcoran prison targeted in the lawsuit is a symptom of a system-wide problem.

"Roofs are failing all over the place," said Don Specter, director of the nonprofit Prison Law Office, which is representing Escareno. "They acknowledge the need of the roofs, (but) they're not making arrangements so people don't get hurt in the meantime."

Besides spawning mold, leaking roofs short out electrical systems, including lights, fire alarm control panels and fire suppression systems, corrections officials say.

Roofs at eight of California's 34 prisons have been replaced, but another 20 still need to be done. Gov. Gavin Newsom's budget includes replacing roofs at two prisons, leaving 18 needing roof replacements and repairs.

It's taken nearly two years just to design the Corcoran prison's new dining room roof, and prison officials could not say when construction will begin.

That led Kings County Superior Court Judge Donna Tarter to half-joke during trial that the roof "is not getting fixed probably in our lifetime." She expects to decide by May whether to order the prison to close the dining hall and feed about 800 inmates in their dormitories, a stop-gap measure that officials said would cause considerable practical complications while interfering with prison programs.

The broader problem of leaking roofs could imperil California's efforts to keep the inmate population below a cap imposed by federal judges to improve prison conditions.

A deteriorating roof membrane that creates space for bird feces and bird parts to get under the roof into the ceiling space atop a dining hall at the California Substance Abuse Treatment Facility and State Prison in Corcoran, California. Prison Law Office / via AP

Corrections Secretary Ralph Diaz told legislators in March that one leaky roof could create problems if inmates have to be moved from cell houses. The state is about 3,300 inmates below the cap but expects to reduce that margin considerably when it returns 1,400 inmates from a private out-of-state prison by June.

"The cushion isn't as robust as we would like," Diaz said.

The problem at Corcoran is that leaking rainwater has destroyed interior ceiling tiles so often that the prison no longer replaces them, prison Lt. Michael Owens testified on behalf of the state. Inmates then toss food onto the ventilation system through the openings in the ceiling, he said, which in turn attracts flies that produce maggots that fall from the ceiling. He also recounted how he ordered inmate workers to regularly scrub the discolored walls with bleach.

Associate Warden Jason Collins and prison Lt. Nicholas Tyler blamed "pruno" — an illicit alcoholic beverage fermented from leftover fruit with a little bread to provide the yeast.

Inmate workers likely climbed atop kitchen carts to hide 10 to 15 pounds (5 to 7 kilograms) of the sticky stuff atop a ventilation duct in the deteriorating ceiling area in November, said Tyler. Collins said he discovered another batch of hidden hooch in February, where it was attracting flies.

The dining hall roof also attracts pigeons — lots of them. There they poop, and some birds die, their waste washing into the building whenever it rains, testified licensed architect, engineer and building contractor Steven Norris.

"We all know that prison is not supposed to be comfortable," inmate Escareno told the judge, "but at the same time it's not designed for me to have to go and eat in a place where I'm feet away from what I know to be bird feces."