The state of North Carolina owes a local school system more than $272,000. The courts have said so.

Yet the state has not paid its debt.

Shouldn’t the courts take action against those deadbeats at the helm of state government? Especially since the courts already have ruled for the school system and against the state?

A unanimous N.C. Court of Appeals opinion in the dispute offers a compelling reason for answering “no.” The opinion offers an excellent lesson about the separation of powers within state government.

The story starts more than five years ago. The Richmond County Board of Education sued various state officials in February 2012. The school board challenged a state law that required the state to collect a $50 fee from defendants convicted of using “improper equipment” on the roads. The fees supported a Statewide Misdemeanant Confinement Fund, helping counties pay for locking offenders up in county jails rather than state prisons.

The Richmond County school board argued in court — successfully — that the law violated a provision of the N.C. Constitution. That provision guarantees that all money from state penalties, forfeitures, and fines heads to counties to pay for local schools.

After two trips to the Appeals Court, the case headed back to a trial court. It ordered the state to pay the Richmond County school system $272,300.

The state never handed over the unconstitutionally collected money. State officials argued that the money already had been spent. To pay Richmond County schools, the state would need a new appropriation from the General Assembly.

When lawmakers took no action to make that appropriation in 2016, Richmond County headed back to court. This time a trial judge ordered the state treasurer, controller, and attorney general to ensure that the court order would be carried out.

Now the Appeals Court has addressed the case for a third time.

One might expect that the three-judge appellate panel, miffed that the General Assembly has taken no action to address the previous court order, would endorse the trial court’s plan. The state owes the money. It can find the money, which represents roughly 0.001 percent of North Carolina’s General Fund budget.

Yet Judge Richard Dietz explains in his court opinion why he and his colleagues refused to take that step. “Among the most important rights guaranteed in the North Carolina Constitution is the Separation of Powers,” Dietz writes. “By reserving certain powers exclusively to one of the three branches, our government has an inherent set of checks and balances, which the Framers believed was essential to preserve liberty and prevent tyranny.”

“Although most Separation of Powers cases (in modern times, at least) involve clashes between the legislative and executive branches, in many ways the judicial branch poses the greatest risk to the doctrine,” Dietz adds.

This is because public officials who ignore court orders can be jailed for contempt. “Left unchecked, this power would permit judges to freely organize and execute State power as they see fit,” Dietz explains.

To prevent the judiciary from overreaching in that manner, the state Supreme Court has ruled consistently that judges cannot use their power “to step into the shoes of the other branches of government,” Dietz writes. “The courts can declare a statute unconstitutional, for example, but cannot draft a new one or order the legislature to do so.”

The same is true for orders involving money. The Richmond County school board did not obtain a preliminary injunction blocking spending from the misdemeanant confinement fund. All money collected for that purpose ended up being spent for that purpose. There is no money left in the fund to pay the school system.

Regardless of the school board’s arguments, it’s not the court’s business to order the General Assembly to appropriate new funds to pay the bill. Nor can the court order the executive branch to pay the money from other state government sources — even an emergency fund.

“In sum, the role of the courts in this constitutional dispute is over,” Dietz concludes. “As the Framers of our constitution intended, the judiciary ‘performed its function to the limit of its constitutional powers.’”

“The State must honor that judgment,” Dietz writes. “But it is now up to the legislative and executive branches, in the discharge of their constitutional duties, to do so.”

If those branches fail to act, “the remedy lies not with the courts, but at the ballot box.”

The decision delivers bad news for Richmond County schools, which surely could benefit from the additional money. But lawmakers can address that problem through legislation.

More important is the three-member Appeals Court panel’s recognition that judges must avoid the temptation to legislate from the bench. If their counterparts serving in other courts at the state and federal level consistently adhered to that principle, we all would benefit.

Mitch Kokai is senior political analyst for the John Locke Foundation.