It got better, but now it’s getting worse.  

For the second time during Philadelphia Mayor Michael Nutter’s tenure, civil rights attorney David Rudovsky is suing the city over prison overcrowding.

He filed a class-action lawsuit against the city in 2008 for the same reason, but postponed it last year after the population dropped below 7,700 inmates.  

“As soon as the court withdraws its authority, what we've seen is the city and the court system fail to keep the pressure on,” says Rudovsky. “The number of inmates rise and we’re back in court.”  

On Monday, U.S. District Judge R. Barclay Surrick approved Rudovsky’s request to reopen his 2008 lawsuit.  

More than 9,400 inmates are in Philadelphia’s prisons now, according to a spokeswoman. They were built to hold 6,500 people.  

About 1,800 of those inmates are living in “triple cells” — crowded three-man cells meant for only one or two people.  

Rudovsky says overcrowding is making living conditions worse, especially at the Detention Center, which doesn't have air conditioning.  

“During that hot period in July, the temperatures approached 100 or more than 100 degrees every day,” he says. “You had scores of people living together, almost right next to each other. In the prison setting, that’s a very volatile and dangerous situation.”  

Philadelphia Prison System spokeswoman Shawn Hawes called Rudovsky’s claims about the facility’s temperatures “disputable.” She declined to comment on the lawsuit.  

Costs are rising along with the inmate population. Last fiscal year, the city spent $231 million in prisons, which is $4 million more than budgeted.  

City officials say the population is rising partly because of two reforms. First, Nutter has asked the courts to impose higher bail on suspects found with illegal guns. Second, the First Judicial District formed a Bench Warrant Court to deal with large numbers of people skipping trial.  

Mayoral spokesman Mark McDonald says the city is reviewing the lawsuit, but declined to comment further.