Ken Lewis, the chief executive of Bank of America, said yesterday that "I don't know of a major bank that doesn't have some significant exposure to AIG".

So AIG's need to raise billions in new capital to shore itself up has sent shockwaves through global markets and helped to undermined the share prices of many banks.

But how exactly are banks "exposed" to AIG?

Light is shed by an insightful bit of research by Sandy Chen of Panmure Gordon.

He has found the following paragraph in AIG's US regulatory filing:

"Approximately $307bn (consisting of corporate loans and prime residential mortgages) of the $441bn in notional exposure of AIGFP's super senior credit default swap portfolio as of June 30, 2008 represented derivatives written for financial institutions, principally in Europe, for the purpose of providing regulatory capital relief rather than risk mitigation. In exchange for a minimum guaranteed fee, the counterparties receive credit protection with respect to diversified loan portfolios they own, thus improving their regulatory capital position."

If you managed to read to the end of that, your reaction is probably "you what?"

Well, I'll tell you what.

AIG is saying here that it has insured $307bn of corporate loans and prime residential mortgages that are on the balance sheets of banks, mostly European banks.

The banks have bought this insurance to protect themselves against the risk that these loans would go bad, that borrowers would default.

Their motive for doing so was to reassure their respective regulators - such as the FSA for UK banks - that these loans are of minimal risk.

And the benefit of doing that was that they could lend considerably more relative to their capital resources.

But if AIG is in trouble, then doubts arise about whether it would be able to honour the financial commitments it has made through these insurance contracts (which, for those of you who like to learn the lingo, are called super senior credit default swaps).

In fact, in a wholly mechanistic way, the downgrades of AIG's credit rating that we saw last night automatically increased the perceived riskiness of loans made by banks that have insured credit with AIG.

Which means those banks' balance sheets become weaker - and that could mean that they'll be forced by their regulators to raise additional capital.

So there's a widespread view among bankers that the US Treasury and the Federal Reserve simply can't allow AIG to fail, in the way that they felt that they could allow Lehman to collapse into insolvency.

If AIG went down, a number of banks' balance sheets would be mullered - there would a dangerous risk to the stability of the global financial system.

Or to put it another way, AIG is so pivotal in the global financial system, it can't be consigned to the dustbin of history in a precipitous way.

PS. For those of you who currently have the willies about HBOS, its exposure to AIG is not life threatening.

What's currently doing for HBOS's share price is blindingly obvious: it provides 20% of all UK residential mortgages; the UK housing market is the major vulnerability of the UK economy; if there's a sharp rise in the number of homeowners defaulting on their mortgages, HBOS would incur significant losses, especially on self-cert, buy-to-let and loans with a high loan-to-value ratio.

But HBOS has recently raised £4bn of new capital to cushion itself against the impact of just such a debacle.

So there is more fear than reason underlying the success of the short-sellers in driving down HBOS's share price - although the short-sellers will claim a modest victory in the decision by Standard & Poors to lower HBOS's credit ratings by a smidgeon.

But HBOS's ratings remain pretty strong. And the rating cuts shouldn't lead to a sharp increase in the cost of its finance or to an exodus of those who provide that finance.

UPDATE 19:25

I suspect that Sandy Chen has found only a part of AIG's credit protection business, since I am told that US banks are more exposed to AIG than are European banks (which is not what the regulatory filing spotted by Chen shows).

And here's a compelling wrinkle. AIG writes its credit default swaps contracts (its loan insurance business) through a French banking subsidiary.

Even so, the possible collapse of AIG isn't a French problem. What AIG needs to obtain is financial support from the American taxpayer at the top holding company level in the US - and it would then use these funds to recapitalise the French bank it owns.

What this shows is the fearful complexity of AIG's corporate structure, which just adds to the difficulty in negotiating a rescue.