Wisconsin's Republican governor refused to call special elections until three courts ordered him to. This is why.

On Tuesday night, Wisconsin voters went to the polls for a round of special elections that Republican Gov. Scott Walker had aggressively tried to block. And Democrats flipped yet another red seat blue.

In Wisconsin’s 1st Senate District, Democratic Door County executive development adviser Caleb Frostman defeated Republican state Rep. Andre Jacque, flipping a Green Bay area district that backed Trump by 17 points on a platform of education funding, protection of health care, and land conservation.

At the same time, Republicans managed to hold onto Assembly District 42 north of Madison, but by only 8 points, versus Trump’s 15-point margin in 2016.

These results are an unpleasant indignity for Walker, who spent weeks trying to prevent these special elections from happening in the first place.

After the Republican occupants of those seats left to take positions in Walker’s administration, Walker refused to call elections to replace them, claiming it was a waste of money — even though the law directed him to do so.

Walker was promptly sued by voters in those districts as well as the National Democratic Redistricting Committee. A judge he had appointed ruled against him, saying, “To state the obvious, if the plaintiffs have a right to vote for their representatives, they must have an election to do so.”

Two more courts ruled against Walker, with the state Court of Appeals offering a blistering reprimand: “The Governor understands he has an obligation to follow the law … We disagree with the Governor’s assertion that special elections ‘are an unnecessary waste of taxpayer resources and confusing to voters.'”

Walker finally agreed to call the elections.

Walker’s real motive may not have been expense or voter confusion, but fear his party would lose. In January, Democrat Patty Schachtner flipped pro-Trump, rural Senate District 10 in another special election, prompting Walker to warn that the result was a “wake up call.” These fears have been further validated after a recent election cost Wisconsin Republicans a state Supreme Court seat.

The GOP has in general resorted to dirty tactics to hold onto power in Wisconsin, with legislation restricting the power to investigate Walker’s administration, and voter regulations that their own attorney general boasted kept them in power in 2016.

But as Tuesday night’s results revealed, Walker cannot get rid of his problems by getting rid of democracy. In Wisconsin, the law prevailed — and voters fought back.