The Wisconsin Supreme Court has overturned part of a law that would have effectively given governors veto power over rules written by the state superintendent of public instruction.

The decision preserves independence for the state Department of Public Instruction, which is currently run by Superintendent Tony Evers.

Gov. Scott Walker and Republican legislators passed the law shortly after they came to power in 2011. It gave the governor's office more centralized power over state agency rules, which are the fine details of laws.

At issue in this case was whether Walker went too far when it came to overseeing rules written by the state superintendent. The state constitution gives the superintendent broad authority over the "supervision of public instruction." In practice, that can mean writing rules on topics ranging from teacher licensure to the school choice program.

Writing the lead opinion for a divided Supreme Court, Justice Michael Gableman said the law, known as 2011 Act 21, gave the state suprintendent no way to proceed with rulemaking without the governor's approval.

"Thus, Act 21 unconstitutionally vests the supervision of public instruction in officers who are not officers of supervision of public instruction," wrote Gableman, one of the court's five conservative justices.

Fellow conservative Justice David Prosser also ruled against the law, as did Justices Shirley Abrahamson and Ann Walsh Bradley, the court's two liberal members. Conservative Justices Patience Roggensack, Annette Ziegler and Rebecca Bradley dissented.

The court's decision upheld rulings by judges at the circuit court and appeals court levels who sided with the teacher's union members who challenged the law.

Sign up for daily news! Stay informed with WPR's email newsletter.

"In the court's view," wrote Dane County Judge Amy Smith in her 2012 order, "the feature that renders Act 21 unconstitutional beyond a reasonable doubt is the fact that Act 21 permits the governor, and the (Department of Administration) Secretary under certain circumstances, to stop the superintendent from starting and/or pursuing the process of rulemaking."

Smith said that placed the governor in a position "superior" to the superintendent when it came to supervising public schools, which Smith said violates the Wisconsin Constitution.

During oral arguments before the state Supreme Court, Gableman sounded skeptical of that reasoning, saying it's the Legislature that gives the superintendent rulemaking power and it's the Legislature that can take it away.

"It is the will of the people as expressed through the Legislature which enjoys primacy, unless those actions are demonstrated beyond a reasonable doubt to be unconstitutional," Gableman said last November.

But in his opinion today, Gableman said that rulemaking was the chief means that the legislature had given the superintendent had to carry out its duty.

Despite Wednesday's ruling, the law will remain in place for other state agencies that report directly to the governor.

Editor's Note: This story has been updated to reflect the Supreme Court's ruling.