A state district judge ruled Monday that Texas' method of funding public schools was inadequate, unfair and unconstitutional.

The decision still has to pass muster with the Texas Supreme Court, as the state is expected to appeal the ruling later this year.

But Monday's bench decision was a victory for the roughly 600 school districts— nearly two-thirds of Texas districts—which have sued the state over the current funding system.

At the heart of Judge John Dietz's ruling is his belief that education in Texas is woefully underfunded and that the current system of paying for it with property taxes creates an unconstitutional statewide tax.

"We either want increased standards and are willing to pay the price, or we don't," Dietz said in his bench ruling, which came after about 15 weeks of testimony.

The state, which lost nearly every argument, is expected to appeal after Dietz releases his final written ruling next month. The one subject the judge left up in the air was charter schools, which he said was the purview of the Legislature.

School districts and teacher groups throughout the state celebrated the ruling.

"Judge Dietz's ruling affirms AISD's position that our district needs adequate resources to serve our students well while meeting the state's increasing standards," Superintendent Meria Carstarphen said in a news release.

"We celebrate the success of our educators and students amid declining resources, but our schools need more resources if we are going to be able to help all of our students achieve their potential. All Texas students deserve a quality education that will help them prepare for--and compete in--today's global economy."

Lawmakers last session cut some $5 billion from education funding and programs, sending a wave of layoffs and other fallout through districts throughout the state.

An argument made by districts—and upheld by Dietz—was that the funding was unfairly distributed and left children in poorer districts at a disadvantage.

Leaders have said the cuts were unavoidable because the state faced a historic shortfall of up to $27 billion, but legislators have also not earmarked any replacement funding during the current legislative session—even as the state is flush with cash from oil and gas profits.

Lt. Gov. David Dewhurst has advocated holding out money to pay into the system in anticipation of having to spend more money on schools in light of a supreme court decision. But he and other leaders have deferred action on either overhauling the school finance system or restoring any funding until after the Texas Supreme Court makes its ruling—an idea that doesn't sit well with some lawmakers who fought the cuts last session.

"I think all the talk about deferring to after the session, until the [Texas] Supreme Court rules, may have merit on the question of how we distribute the money among the districts, but I don't think that it has merit with regard to the very important decision of how much money the system requires," said Rep. Mark Strama, D-District 50. "I don't think we need a court to tell us that the system is not producing the results we demand from it."

The Texas branch of the American Federation of Teachers also urged lawmakers to act and not wait for a ruling, which could come next year.

"Today's ruling should spur the Legislature to do what it ought to be doing anyway—using the state's resurgent revenue to restore school funding that was cut severely last session and reforming the school finance system to satisfy constitutional requirements," Texas AFT President Linda Bridges said. "The inevitable appeal that the state's lawyers will pursue in this case must not become an excuse for legislative inertia. The state needs to invest more in public education immediately because the kids can't wait."