The Wisconsin Supreme Court cleared the way on Tuesday for significant cuts to collective bargaining rights for public workers in the state, undoing a lower court’s decision that Wisconsin’s controversial law had been passed improperly.

The Supreme Court’s ruling, issued at the close of the business day, spared lawmakers in the Republican-dominated Capitol from having to do what some of them strongly hoped to avoid: calling for a new vote on the polarizing collective bargaining measure, which had drawn tens of thousands of protesters to Madison this year and led Democratic lawmakers to flee the city in an effort to block the bill.

Republican leaders had warned on Monday that if the Supreme Court did not rule by Tuesday, they would feel compelled to attach the same measure to the state’s budget bill, which is expected to be approved this week.

Four months after the fight began, the decision ended, at least for now, lingering questions about when and whether the cuts would take effect, but it also underscored the state’s partisan divide, which seems to grow wider by the day. The ruling was 4 to 3, split along what many viewed as the court’s predictable conservative-liberal line. One of the dissenting justices even raised the specter of a “partisan slant” by the other side.