What a difference. This week’s enactment of a right to work law by Michigan lawmakers comes only three years after the 2009 government-directed bankruptcies of General Motors and Chrysler seemed to cement the United Auto Workers union (UAW) as kings of Detroit. The Obama administration, eager to please a key union constituency, moved the UAW to the front of the creditors’ queue in the bankruptcy proceedings for both firms, at the expense of secured creditors who got a fraction of what they were due. Now, it turns out, the bankruptcy that seemed like a display of union muscle was more like a huge bite taken by a snake eating its own tail.

Rather than a testament to the UAW’s endurance, the GM and Chrysler bankruptcies were indicative of the Big Three’s unsustainable accommodation with Big Labor. In fact, union-negotiated work rules and pension benefits helped bring the Detroit automakers — and Michigan — to the brink of ruin. Today, the state has the nation’s sixth-highest unemployment rate, at 9.1 percent, and has lost 7,300 jobs since January. Clearly, the state’s economy wasn’t working, so something had to give, but the quickness and extent of the change was unexpected by just about everyone across the political spectrum. As U.S. News’ Rick Newman aptly describes it, “[T]he turn of popular opinion against unions in Michigan is akin to pot-smoking pagans driving the Mormons out of Utah: It’s a revolution of sorts, with the old order being unceremoniously booted.”

So how did Michigan come to this point? Part of the answer lies in the key to the UAW’s power: limited competition among employers. The world in which the UAW and other large industrial unions grew up is long gone. The UAW first organized the Big Three through a series of strikes in the mid to late 1930s. Then came World War II, and Detroit joined the war effort, producing for a guaranteed customer — the U.S. military. After the war, large U.S. industrial firms, including automakers, faced little competition from abroad. In Detroit, this led to a comfortable arrangement between management and labor, where unions could negotiate generous pay and benefits because strikes would be even more costly to the employers. Each automaker, meanwhile, could pass on to consumers the added costs because their competitors were bound by similar labor contracts.

Foreign competition changed all that. As the Detroit auto industry went into decline, the political forces it sustained were bound to weaken, but inertia in politics is hard to resist. Detroit’s crumbling big business/big labor modus operandi appears to have finally run out of steam, but it needed someone to push it to topple over. What is surprising is that the final push was made by an unlikely champion of right to work.

Michigan Republican Governor Rick Snyder ran as a technocratic problem-solver, and took office in 2010 seemingly well aware of the constraints he faced as a Republican executive in America’s fifth most unionized state. His support for right to work legislation was soft; he said that he would not pursue it, but would sign a bill if it reached his desk. He told reporters as late as December 4, “Right to work is not on the agenda; we are having discussions on it.” But Republicans, in control of both houses of the legislature, sensed an opportunity and took it. Only two days later, right to work bills passed the Michigan House and Senate. Governor Snyder signed the final legislation into law this week.

Republicans had good reason for optimism. In November, voters in Michigan rejected Proposition 2, a union-backed state constitutional amendment that would have embedded collective bargaining as a “right” in the state constitution, by a 16-point margin. The measure would have given unions a de facto veto over legislation they oppose. As my former colleague Vinnie Vernuccio, now with the Mackinac Center, explains:

Prop 2 says, “No existing or future law of the state or its political subdivisions shall abridge, impair or limit” unions’ ability to “negotiate in good faith regarding wages, hours, and other terms and conditions of employment…” In other words, government unions will no longer be governed by elected officials, the taxpayers, or even the laws of the state; those would all be subordinated to a collective bargaining agreement.

Union leaders promoted Prop 2 as a response to what they considered state-level “anti-union” legislation, such as the recent public sector labor reform in Wisconsin. Had Prop 2 succeeded, unions might have tried to push it to other states as a model.

To organized labor, the resounding defeat of Prop 2 and the passage of right to work in Michigan is a one-two punch. Naturally, the unions will do everything in their power to turn back the tide, but their options are limited. The Wisconsin labor reform went through several legal challenges, but the unions likely will find that route more difficult in Michigan, were such a challenge to come forth. “I think the law was well-enough written that there’s no legal basis to block implementation,” says Greg Mourad, an attorney at the National Right to Work Legal Defense Foundation. “A biased judge could try to delay implementation anyway, but I think an order to that effect would be overturned on appeal relatively easily.”

Union representatives have indicated that they hope to place a referendum on the law on the 2014 ballot, and are certain to pour considerable effort and resources into defeating Snyder that year. But they may find that a tough (though not impossible) sell. A recent EPIC/MRA poll found a 51 percent approval rating for Snyder and a slight plurality in favor of a right to work law — 47 percent vs. 46 percent opposed. Moreover, the same poll found that the concept of right to work (allowing workers to decide on their own whether to join a union) polled especially well, which gives supporters of the law a good opportunity to put forward a winning message. Demography doesn’t help the unions, either. While their share of the workforce is still higher in Michigan than in most other states, membership is in the midst of a long-term decline (though with a slight recent uptick).

The right to work law does come with some caveats. While it covers both private and public sector workers, it doesn’t apply to public safety personnel. More importantly, the law grandfathers in existing contracts, many of which don’t expire until 2015. But for firms considering setting up business in Michigan, the greater labor market flexibility will make the state more attractive.

Michigan could be seen as the private sector version of Wisconsin, in terms of both significance and symbolism. For government employee unions, losing collective bargaining privileges in Wisconsin meant a lot not only in terms of dues money. Wisconsin was the first state to allow government employees to bargain collectively with the state. It is also where the American Federation of State, County & Municipal Employees, the nation’s largest government employee union, was founded. Meanwhile, Michigan has long been the nation’s epicenter of industrial unions. It is home to the UAW and the place where Jimmy Hoffa turned the Teamsters into a political powerhouse. If they can’t hold on to the status quo in Michigan, where else will be left for them to go?