A Wisconsin judge ruled Thursday that the state's explosive new union law that would severely limit the collective bargaining power of most public-sector employees is not in effect.

Dane County Circuit Judge Maryann Sumi's ruling follows a restraining order she issued earlier this month preventing the secretary of state from publishing the law, typically the last step before it takes effect. But another state office published it and Republicans who pushed the legislation declared the law in effect. Sumi issued a declaration on Thursday morning saying the law wasn't properly published.

The ruling deals a setback to Gov. Scott Walker and his administration, which said Tuesday that work on the payroll changes would stop if Sumi ruled the law hadn't taken effect.

The ruling is just the latest twist in a budget drama that has gripped the nation's attention for the last several weeks.

Republicans passed the bill this month by outmaneuvering Senate Democrats who had fled the state to block a vote. Republicans split the collective bargaining part from the budget relief bill so they wouldn't need a quorum to hold a vote.

But Dane County District Attorney Ismael Ozanne and Assembly Minority Leader Pete Barca, both Democrats, filed a court challenge, arguing that Republicans violated the open meetings laws.

As the open meetings suit was pending, Sumi issued a temporary restraining order that prevented Secretary of State Ken LaFollete from publishing the law, now known as Act 10. Publication of the law is the last step to putting a bill into effect, and Democrats argue that the law is not in effect until LaFollete issues the publication. However, the Legislative Reference Bureau also has responsibility for publishing laws, and Republicans said LRB's publication makes it official.

Republican Attorney General J.B. Van Hollen had advised Walker that because Sumi didn't specifically name the administration in her order barring further action on the law, it can proceed with the payroll changes. Justice Department Executive Assistant Steve Means said Wednesday that the state's position had not changed.

Republican Assembly Speaker Jeff Fitzgerald went further, openly questioning the judge's right to rule in the case, saying it "flies in the face of the separation of powers between the three branches of government."

"It's disappointing that a Dane County judge wants to keep interjecting herself into the legislative process with no regard to the state constitution," Fitzgerald said in a statement.

Walker released the rest of this year's budget balancing plan Wednesday, drawing support from Democratic leaders, and the Legislature was expected to pass it next week.

Sumi and others have suggested the Legislature could resolve issues over the legality of the collective bargaining law by simply passing it again.

Fox News' Mike Tobin and The Associated Press contributed to this report.