Boy, who would have ever thought the last-minute bailout of Bear Stearns back in March would end up being one of the more minor financial interventions we'd see this year?

In just the past 11 days, the government was forced to take over or seal the fate of:

  • The two largest mortgage companies in the world.
  • The fourth-largest independent investment bank in America.
  • One of the largest insurance companies in the world.

AIG (NYSE:AIG) -- facing an inevitable collapse without a huge cash injection -- finally got the gift it needed late Tuesday night after the Federal Reserve agreed to provide an $85 billion credit facility that'll prevent what would have been by far the largest bankruptcy in history, sending the markets into unimaginable panic.

Terms of the deal are very similar to the recent bailout of Freddie Mac (NYSE:FRE) and Fannie Mae (NYSE:FNM) -- I'm willing to bet they just used the same paperwork. In return for the loan, the government will get warrants to purchase 79.9% of the company's common stock, diluting existing investors into oblivion. CEO Robert Willumstad will be replaced by former Allstate (NYSE:ALL) CEO Edward Liddy.

Geesh … another bailout?
Shocked? You should be. Until late Tuesday afternoon, Treasury Secretary Hank Paulson was adamant that he had no intention of using taxpayer money to bail out the struggling insurance company. The original plan was to facilitate a credit line through Goldman Sachs (NYSE:GS) and JPMorgan Chase (NYSE:JPM), but both firms appeared to have scoffed at the idea. Option two, as most predicted, was bankruptcy.

Why the sudden change of heart? I have a few thoughts. First, while this is certainly a bailout by any measure, let's not get too carried away with what that implies: There's a good chance taxpayers will get paid back every penny they put into this deal, and then some. With the government's warrants on nearly 80% of the company, there's actually a good chance taxpayers will turn a handsome profit on the deal.

The reason is that AIG isn't insolvent, it's illiquid. The difference: Someone with $1,000 in debt and $100 in the bank is insolvent; someone with $1,000 in debt and a farm worth $100,000 that'll take six months to sell is illiquid. With the Fed's credit facility, AIG will now have the liquidity to start selling assets at a non-fire-sale pace, with the proceeds going first and foremost toward paying off the government's loan. Knowing that taxpayers' downside is largely protected surely made Fed Chairman Ben Bernanke and Paulson's decision a little easier.

Second, we need to realize how catastrophic an AIG bankruptcy would have been. Not only is it hundreds of billions of dollars larger than Lehman Brothers (NYSE:LEH), but AIG has its financial tentacles in nearly every corner of the globe. With everyone already hot and bothered by Lehman's collapse, AIG's failure would have tested the global financial market's flexibility past the breaking point. You can whine and moan all you want about "yet another government bailout" -- and you're absolutely right -- but Paulson and Bernanke really had no choice on this one.

What a week
Let's just hope AIG's bailout marks the final chapter of the recent financial meltdown. Of course, we'll keep you updated throughout the week on these incredible stories. For more on this week's events, check out "The Biggest Financial Story in 50 Years" for a collection of Motley Fool articles surveying these crazy times.   

For related Foolishness:

Fool contributor Morgan Housel doesn't own shares in any of the companies mentioned in this article. JPMorgan Chase is a Motley Fool Income Investor recommendation. The Fool has a disclosure policy.