HARRISBURG, Pa. — Pennsylvania’s highest court will allow criminal defendants to sue a county in an effort to prove a public defender’s office isn’t adequately funded to provide the constitutional right to an attorney, a victory for civil rights lawyers.

The state Supreme Court’s unanimous ruling late Wednesday overturned a lower appellate court decision.

Mary Catherine Roper, the deputy legal director of the American Civil Liberties Union of Pennsylvania, said Thursday that, while the ruling is a victory, it is not a final victory for the plaintiffs — two criminal defendants — in the lawsuit against Luzerne County in northeastern Pennsylvania.

Those two plaintiffs, Adam Kuren and Steven Allabaugh, have since been convicted or pleaded guilty.

But it is new avenue to force better representation for poor criminal defendants in Pennsylvania, the only state that leaves funding for the defense of indigent defendants entirely up to county governments, according to the ACLU.

The 61-page ruling now means that criminal defendants have standing to sue before their case is decided in an effort force counties to adequately fund the public defender’s office, Roper said.

“What it means is that in counties all across Pennsylvania there is someone who can sue,” Roper said. “The people who are affected by these underfunded public defender’s offices all across Pennsylvania can go to court to say, ‘You have set up a system that is violating my rights,’ and that is very important. Without someone who can go into court, you can’t fix it.”

The ACLU originally filed a lawsuit in 2012 on behalf of the chief public defender in Luzerne County, Al Flora, alleging that funding and staffing were so low that defendants were not properly represented and were being denied their Sixth Amendment right to an attorney.

The ACLU pressed on with the lawsuit on behalf of poor defendants after the county fired Flora, who is being represented by the ACLU in his illegal retaliation lawsuit against the county. Lower courts, however, had ruled that criminal defendants did not have standing to sue.

The ACLU argued the case with Philadelphia-based civil rights lawyer David Rudovsky and Philadelphia-based law firm Dechert LLP. The ACLU’s case also received support through “friend of the court” briefs from the U.S. Department of Justice and the American Bar Association.

Luzerne County’s manager, C. David Pedri, did not immediately return a call seeking comment Thursday. In oral arguments in April, a lawyer for Luzerne County said the county had hired five more full-time public defenders and had continued to increase funding for the office.