Updated

The Wisconsin Supreme Court narrowly ruled Tuesday that the state's contentious union rights law can go into effect, giving Republican Gov. Scott Walker a major victory after a long and dramatic battle.

The high court upheld Walker's law in a 4-3 vote, reflecting the partisan divide of the members.

Walker pushed the law that eliminates most of public employees' collective bargaining rights and forces them to pay more for their health and pension benefits. He says it's needed for the state to address its budget problems.

"The Supreme Court's ruling provides our state the opportunity to move forward together and focus on getting Wisconsin working again," Walker said in a statement.

The law passed in March after weeks of protests that drew tens of thousands of people to the state Capitol. But the law has been tied up in the courts since a Democrat filed a lawsuit accusing Republicans of violating the state open meetings law during the run-up to passage.

The Wisconsin Supreme Court said the judge had no authority to interfere with the legislative process.

The court ruled Tuesday just hours before the Republican-controlled Assembly was planning to start debating the state budget and possibly adding the collective bargaining provisions since the case was tied up in the court.

Supreme Court Chief Justice Shirley Abrahamson wrote a blistering dissent of the court's ruling, accusing Justice David Prosser of appearing to have a "partisan slant" with his concurring opinion.

Abrahamson says the ruling was hastily reached. It came just eight days after oral arguments.

Abrahamson was joined in the dissent by Justices Ann Walsh Bradley and Patrick Crooks. In the majority were Prosser, Michael Gableman, Annette Ziegler and Patience Roggensack.

The Associated Press contributed to this report.