AMERICANS expect much from their president, but they do not think he should run car companies. Fortunately, Barack Obama agrees. This week the American government moved closer to getting rid of its stake in General Motors (GM) when the recently ex-bankrupt firm filed to offer its shares once more to the public (see article).

Once a symbol of American prosperity, GM collapsed into the government's arms last summer. Years of poor management and grabby unions had left it in wretched shape. Efforts to reform came too late. When the recession hit, demand for cars plummeted. GM was on the verge of running out of cash when Uncle Sam intervened, throwing the firm a lifeline of $50 billion in exchange for 61% of its shares.

Many people thought this bail-out (and a smaller one involving Chrysler, an even sicker firm) unwise. Governments have historically been lousy stewards of industry. Lovers of free markets (including The Economist) feared that Mr Obama might use GM as a political tool: perhaps favouring the unions who donate to Democrats or forcing the firm to build smaller, greener cars than consumers want to buy. The label “Government Motors” quickly stuck, evoking images of clunky committee-built cars that burned banknotes instead of petrol—all run by what Sarah Palin might call the socialist-in-chief.

Yet the doomsayers were wrong. Unlike, say, France's President Nicolas Sarkozy, who used public funds to support Renault and Peugeot-Citroën on condition that they did not close factories in France, Mr Obama has been tough from the start. GM had to promise to slim down dramatically—cutting jobs, shuttering factories and shedding brands—to win its lifeline. The firm was forced to declare bankruptcy. Shareholders were wiped out. Top managers were swept aside. Unions did win some special favours: when Chrysler was divided among its creditors, for example, a union health fund did far better than secured bondholders whose claims should have been senior. Congress has put pressure on GM to build new models in America rather than Asia, and to keep open dealerships in certain electoral districts. But by and large Mr Obama has not used his stakes in GM and Chrysler for political ends. On the contrary, his goal has been to restore both firms to health and then get out as quickly as possible. GM is now profitable again and Chrysler, managed by Fiat, is making progress. Taxpayers might even turn a profit when GM is sold.

So was the auto bail-out a success? It is hard to be sure. Had the government not stepped in, GM might have restructured under normal bankruptcy procedures, without putting public money at risk. Many observers think this unlikely, however. Given the panic that gripped private purse-strings last year, it is more likely that GM would have been liquidated, sending a cascade of destruction through the supply chain on which its rivals, too, depended. As for moral hazard, the expectation of future bail-outs may prompt managers and unions in other industries to behave rashly. But all the stakeholders suffered during GM's bankruptcy, so this effect may be small.

Socialists don't privatise

That does not mean, however, that bail-outs are always or often justified. Straightforward bankruptcy is usually the most efficient way to allow floundering firms to restructure or fail. The state should step in only when a firm's collapse poses a systemic risk. Propping up the financial system in 2008 clearly qualified. Saving GM was a harder call, but, with the benefit of hindsight, the right one. The lesson for governments is that for a bail-out to work, it must be brutal and temporary. The lesson for American voters is that their president, for all his flaws, has no desire to own the commanding heights of industry. A gambler, yes. An interventionist, yes. A socialist, no.