By Duncan Bartlett
Business reporter, BBC News
It is only four years ago that Japan's banking crisis seemed close to triggering a global recession.
Shares are falling as Japanese banks are in trouble yet again
Most of the big banks were in trouble and many seemed to be heading towards bankruptcy.
Given their wealth and global influence, it was often said that if one of the big Japanese banks went under, it would trigger a financial crisis that would spread around the world.
That did not happen, mainly because the Japanese banks purged their bad debts before they went out of business.
It was an expensive and painful process, but could provide a guide as to how America and Europe should respond to the current turmoil.
First, a reminder of how bad things looked in 2002.
At that point it seemed almost inevitable that one of the huge Japanese banks would find itself insolvent.
It became clear that they had a severe problem with bad debt - money that they had lent to companies and individuals who could not repay it.
During a property market boom, the banks were happy to lend to builders and developers, especially those who were putting money into offices and shops in big cities like Tokyo.
Then property prices tumbled and the developers could not repay their loans.
That has a parallel with the sub prime lending problem in the United States, although in America it was primarily the low income home-owners who would struggle to pay their mortgage that caused the banks trouble.
The result was the same, though.
Banks were losing money in loans to people who could not repay them and whose collateral, the value of their property, was less than the value of those loans.
The Japanese authorities agonised over what to do.
They slashed interest rates to zero. They pumped money into the financial system, just as America has.
But in the end, they took the expensive and painful decision to use tax payers' money to help the banks write off the bad loans.
The price was enormous.
At least $100bn dollars went on the programme.
The Bank of Japan lent money to institutions at special rates and also bought some of their shares.
The money came with an important proviso; the Bank of Japan wanted full disclosure of how serious the problem was and a promise from the banks not to let it happen again.
When the figures were made public, they caused shock.
In many cases, this hit the banks' share prices and caused anxiety to both customers and investors.
Yet by 2006, most were back in profit and credibility was restored.
The Bank of Japan even managed to make a profit from the whole affair, through selling the shares it bought at the time for more than it paid for them.
However, there is a sad epilogue to the story.
Japan - as of September 2008 - is once again on the verge of recession.
Part of the problem is the exposure of Japanese banks to the sub-prime market in the US.
Furthermore, banks such as Aozora and Shinsei have been lending money to Lehman Brothers, which filed for bankruptcy protection earlier this week.
Their bad loans to Japanese customers may have been dealt with but they are still effectively lending money to Americans who cannot repay their debt.
This accounts for the sharp fall on the main Japanese share index, the Nikkei.
Strong export sector
Yet the Japanese economy is not entirely dependent on the fortunes of its financial services companies.
Japan is rich because of scientific innovation and manufacturing, even though a lot of the factories that make Japanese-branded goods have moved to China.
For that reason, the†turmoil at the banks and on the stock market will not necessarily cause deep alarm.
Even the return of a recession will be tolerated, provided the engine of Japanese growth - its booming export sector - continues to sell to the rest of the world.