Proponents of the nationalization of troubled big banking companies like Citigroup generally make the case that the work should be done with dispatch and the banks returned promptly to private hands. But the test case for nationalization, AIG, is demonstrating that it may not be that easy.

When the Federal Reserve effectively took over AIG in mid-September, fearful after the fall of Lehman Brothers of letting a firm even more central to global financial markets go belly up, the plan was for a quick turnaround: The government loaned AIG $85 billion on pretty tough terms, installed new management, and ordered the firm to start selling off its still-profitable insurance subsidiaries pronto to pay off the debt. But in the middle of a global financial crisis there aren’t a lot of people who can afford to (or want) buy insurance companies. So in November the terms were relaxed and the bailout grew to $150 billion, and now they’re easing yet again and the government is pumping in another $30 billion. As Carol Loomis put it in an illuminating explanation of AIG’s predicament that ran in Fortune in December:

The ties that bind these two parties … bring to mind the 1942 movie classic “The Man Who Came to Dinner,” in which Monty Woolley, playing the insufferable Sheridan Whiteside, arrives to dine, injures his hip on the front steps, and stays on for the duration, driving his hosts batty. In today’s reality show, AIG is The Company That Came to Dinner, and the trapped, restless host is the government. Don’t ask when these two will be parting ways, because there’s no date set.

Why are we doing this for AIG? There is perhaps no financial company less deserving, in moral terms, of taxpayer aid. This is from Joe Nocera’s column in Saturday’s New York Times:

When you start asking around about how A.I.G. made money during the housing bubble, you hear the same two phrases again and again: “regulatory arbitrage” and “ratings arbitrage.” The word “arbitrage” usually means taking advantage of a price differential between two securities — a bond and stock of the same company, for instance — that are related in some way. When the word is used to describe A.I.G.’s actions, however, it means something entirely different. It means taking advantage of a loophole in the rules. A less polite but perhaps more accurate term would be “scam.”

Essentially, AIG got into the business of insuring much of the world’s financial system against the consequences of a global financial meltdown. It turned out to be incapable of delivering on that insurance—no private company could deliver on it, which is one reason why AIG’s business of selling credit default swaps was a scam. And so government has stepped in as the ultimate insurer.

Providing insurance where private institutions can’t is one of the most important and essential roles of government. Washington’s failure to understand its role as insurer that was one of the key things that made the Great Depression great. But there’s insurance that follows proper underwriting standards and insurance that does not. Our government’s current experiment in insurance provision most certainly does not.

The fault there lies mostly in the past: Regulators had procedures in place to wind down banks in an orderly fashion and partially protect their depositors, plus a mechanism to collect insurance premiums to pay for all this. But they allowed a few non-bank institutions, and non-bank parts of banking companies, to grow so large and entwined that they couldn’t fail without threatening a broader financial meltdown. And so now we’re getting this muddled, hugely expensive bailout/takeover.

Costs keep going up on the AIG bailout not because CEO Ed Liddy is doing stupid stuff. All appearances are that he’s trying to wind down the bad parts of the company as quickly and responsibly as possible and keep the rest alive. It’s just that the losses are bigger than the government and the company anticipated, plus they keep growing as the global economy worsens. It may be that it would make more sense in terms of management focus and incentives to split AIG into a good insurance company (“new AIG,” to follow the model for banks laid out the other day by Willem Buiter) and a bad one. But the basic problem still remains—somebody would still have to shoulder the losses of the bad company.

AIG’s shareholders are already virtually wiped out, so while there’s something to be said for completely wiping them out (the government currently owns 79.9% of the company), that won’t pay for anything. Which leaves AIG’s creditors and derivatives counterparties (that is, the people it owes money to) and taxpayers. The fear in hitting the former is that if creditors were forced to take another big blow all lending to financial institutions around the world would stop and, as a consequence, financial intermediation would more or less end and we’d be reduced to bartering and digging for grubs. That fear is exaggerated, but there’s at least a germ of truth to it—and even if creditors shouldered some of the burden the losses are so huge that taxpayers would still be stuck paying for a lot.

That leaves the final question: Which taxpayers? I’m a big fan of the concept of clawing back ill-gotten gains, and in a just world Hank Greenberg and Martin Sullivan, the former CEOs who got AIG into this mess, would currently be working as greeters at a Wal-Mart to make ends meet (rather than, in Greenberg’s case, going on CNBC all the time). But the legal logistics of this are daunting. A blunter but more realistic instrument is the tax rate we charge on those with very high incomes: Bankers and other financial types have been overrepresented at the top of the income distribution, so why not just tax them more? Of course, not all bankers made messes, and bankers aren’t the only high earners.

The best approach is probably to charge financial system participants appropriate premiums for the insurance that government is providing them. That has to be a major part of any new financial regulatory structure. But it won’t pay for anything now.