RALEIGH, N.C. (AP) — North Carolina legislators violated the state constitution by diverting traffic fine revenues to pay for jails instead of schools, but a state appeals court ruled Tuesday judges can't make officials cough up the money that should have helped educate students.

The judges ruled unanimously that the Richmond County school system is owed $272,300, reversing a trial judge's order last November commanding various state officials to immediately pay the school district or risk being thrown in jail.

The state constitution says the "clear proceeds" of all fines, penalties and forfeitures collected for breaking the law belong to counties and must be used only for maintaining public schools.

"The state violated the North Carolina Constitution when it moved money otherwise destined for the Richmond County schools to a separate State fund," Judge Richard Dietz wrote for the three-judge panel. But "when the courts enter a judgment against the state, and no funds already are available to satisfy that judgment, the judicial branch has no power to order state officials to draw money from the state treasury to satisfy it."

The dispute concerns a 2011 decision by legislators to create a new $50 fine for traffic violations and use the money to pay counties to house some misdemeanor offenders in their jails rather than in state prisons. The now-repealed fine was charged for improper equipment, a non-moving violation for dangerous tires or a broken speedometer or muffler.

The appeals court also ruled in 2015 that Richmond County schools should get the fines instead. Nearly three dozen other school districts quickly sued the state for more than $46 million they said should have gone to help students.

But the money was gone toward the county jail program and "without a new appropriation from the General Assembly, there were no funds available to satisfy the judgment," Dietz wrote.

___

Follow Emery P. Dalesio on Twitter at http://twitter.com/emerydalesio. His work can be found at https://apnews.com/search/emery%20dalesio