IT GOT BETTER, but now it's getting worse.

For the second time during Mayor 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 suspended 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 rises and we're back in court."

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

More than 9,400 inmates were in Philadelphia's prisons on Tuesday, according to a spokeswoman. The prisons were built for only 6,500.

About 1,800 of those inmates were living in "triple cells" - cells meant for only one or two people.

Rudovsky says living conditions are getting worse because of the population jump, and the lack of air conditioning at the Detention Center doesn't help matters.

"During that hot period in July, the temperatures approached 100 or more than 100 degrees every day," he said. "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 prisons spokeswoman Shawn Hawes called Rudovsky's claims about the Detention Center'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 on prisons, $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.