A landmark lawsuit challenging how Pennsylvania pays for public education is moving closer to trial after Commonwealth Court dismissed state lawmakers' last remaining objection to the case.

State Senate President Pro Tempore Joe Scarnati (R., Jefferson) argued for dismissal on the ground that in 2016, Pennsylvania  adopted a formula directing more money to school districts with greater student needs. But the plaintiffs — among them the William Penn School District in Delaware County and parents of Philadelphia students — said that disparities between low and high-wealth districts had increased despite the formula, which applies only to a portion of what Pennsylvania spends on public education.

"Clearly, a factual dispute about the significance and adequacy of the funding changes … persists," the court said in its order Monday.

A spokesman for Scarnati did not immediately respond Tuesday to a request for comment. Neal Lesher, a spokesman for House Speaker Mike Turzai (R., Allegheny), said lawmakers had increased funding for school districts by $2 billion since 2015.

"Crafting a budget, including education funding, is constitutionally a legislative matter that we take very seriously," Lesher said. "We continue to believe that this matter does not belong in the courts."

Filed in 2014 by the Education Law Center and Public Interest Law Center on behalf of school districts, parents, and statewide organizations, the lawsuit alleges that the state is violating its constitution by failing to adequately educate children and discriminating against children based on where they live.

It was dismissed in 2015 by Commonwealth Court, which held that education funding couldn't be reviewed by judges. But the Pennsylvania Supreme Court reversed that decision last year, reviving the case and sending it back to the lower court.

Legislative leaders continued to argue that it shouldn't move forward — in part because the state had since adopted a funding formula. Monday's order put an end to those objections.

While lawmakers still may file additional motions, the next stage is deciding what the trial will look like, how the issues will be presented and the timetable for producing evidence, said Maura McInerney, legal director of the Education Law Center.

Pennsylvania's formula "in no way resolved the broken funding system in the state," McInerney said. "It did not add a single dollar to the state contribution to education. … There's no question that the schools that are underfunded continue to suffer from the same harm."

Staff writer Kristen A. Graham contributed to this article.