Five months after Gov. Scott Walker of Wisconsin pushed through a law stripping public unions of their bargaining rights, the Republican Party has paid a price. Two of the state senators who backed the law were thrown out of office by voters on Tuesday and replaced with Democrats. Mr. Walker’s opponents did not succeed in turning over the Senate, but it was still an impressive response to the governor’s arrogant overreach.

Recall elections are extremely difficult to win; only two had succeeded in the state in the last 80 years. The districts lean Republican, and getting people to turn out in an unusual off-year election is always a struggle. Had Democrats won one more district, they would control the Senate, but they were also trying to send a warning to Republican lawmakers around the country who are trying to break public employee unions. In that, they succeeded.

Republicans will not admit this, but the numbers showed significant strength for Democrats even in the districts they lost — strength that could grow if lawmakers continue cutting spending and taxes while reducing the negotiating rights of working families. In one rural senatorial district that had not elected a Democrat in a century, the Democratic candidate reached 48 percent of the vote. Another race was also close, and as Nate Silver noted in The Times, the overall results suggest that a contemplated statewide recall of Mr. Walker himself would be too close to call. (Two Democrats face recalls next week.)

Mr. Walker and his colleagues tried to paint the unions as unwilling to sacrifice a bit of their pensions and health benefits in rough fiscal times. It was heartening to see more than 160,000 Wisconsin voters reject that false notion. The unions had already agreed to significant concessions on both; what the Republicans really wanted was to break their organizing ability by ending bargaining on anything except wages and limiting raises to inflation.