Pennsylvania has one of the worst, most inequitable school funding arrangements in the nation. The legislature has fiddled and done nothing, allowing wide disparities to remain.

But today the Pennsylvania Supreme Court ruled in favor of permitting a trial on funding inequities. This is a big win for districts who are desperately underfunded.

The Pennsylvania Supreme Court on Thursday opened the door to a lawsuit by the William Penn School District and others asking courts to remedy wide funding disparities among school districts, breaking with decades of precedent dismissing such challenges.

Courts “must take great care in wading deeply into questions of social and economic policy, which we long have recognized as fitting poorly with the judiciary’s institutional competencies,” Justice David Wecht wrote in the majority opinion.

But “it is fair neither to the people of the Commonwealth nor to the General Assembly itself to expect that body to police its own fulfillment of its constitutional mandate.”

The court’s opinion — joined by four justices and accompanied by two dissenting opinions — does not resolve the William Penn lawsuit.

But it enables a trial court to hear arguments in the case, which contends that Pennsylvania’s school-funding system violates the state constitution’s guarantee of a “thorough and efficient system” of education, and its equal-protection provision. Commonwealth Court had dismissed the suit, which lawyers for the plaintiffs said Thursday they would now seek to expedite.

Pennsylvania’s school-funding system has long been a subject of complaint, with some of the widest spending gaps in the country between low- and high-poverty districts and heavy reliance on property taxes to fund schools.

In the William Penn School District — which has some of the highest tax rates in the state, but spends less per pupil than nearby Lower Merion — “we are moving ahead,” a jubilant Jane Harbert, superintendent of the district, said Thursday. “I have to tell you, it just bring tears to my eyes that we’re allowed to go further with this. We’re fighting a battle not just for William Penn but for the whole state of Pennsylvania.”

The first person she called with the news, Harbert said, was former superintendent Joseph Bruni, who spearheaded the suit. In an interview, he said he had waited a long time for this.