Cook County Judge Neil H. Cohen ruled that Quinn violated the section of the Illinois Constitution that holds that state lawmakers’ salaries must not be changed during the term in which they were elected.

Quinn, who yanked lawmakers’ salary in a bid to leverage passage of stalled pension-reform legislation, said Thursday he would appeal and seek a stay of the judge’s decision.

Cohen, who surprised both sides of the dispute with his unannounced decision on the matter Thursday, could take up the question of a stay as early as Friday morning.

The ruling was a decisive legal setback for the governor. Cohen’s opinion, if upheld, would deprive Quinn of a key leverage point to hold over legislators’ heads to help broker a deal in Springfield’s long-running pension impasse.

But politically, win or no win, the governor stands to emerge from the fight in court with a talking point for his 2014 re-election bid. Voters seemed overwhelmingly to be in his corner in going after lawmakers’ paychecks, even though Topinka on Thursday called the move “government by blackmail.”