It was the pebble that started a landslide. This month marks the 20th anniversary of the May 1997 speculative assault on the Thai baht. To most people the initial attack passed unnoticed. It was only six weeks later, when the Thai authorities were forced to admit defeat and devalue their currency, that the world sat up and took notice. But from that point the crisis rapidly gathered momentum, spreading by contagion throughout Asia, toppling currencies and governments across the region, rocking emerging economies from Brazil to Russia, and threatening the integrity of some of Wall Street’s biggest institutions.

Now, 20 years on, it is instructive to look back at what happened and see what lessons have been learned, what have been ignored, and what were once learned but have since been forgotten.

As with other, more recent financial upheavals, most observers utterly failed to see the baht crisis coming. At the time, Thailand was widely regarded as the poster child of Asia’s fast-industrialising tiger economies. Analysts were smitten by its fast growth, sound fundamentals, and sky-high returns on investment.

Nevertheless, the warning signs were there. Southeast Asia’s economies, including Thailand, had done well in the early 1990s. By pegging their currencies to the US dollar, which was going through a protracted soft patch at the time, opening their economies to inward investment, and steering capital into favoured sectors, Asian governments rapidly built up export industries whose international competitiveness propelled enviable double-digit growth.

More than one regional leader boasted about a new economic model based on “Asian values” that would displace the flawed systems of the developed world. But behind their braggadocio, problems were emerging. In early 1995, the US dollar bottomed out and began strengthening again, notably against the yen. In Thailand, the initial effects of this turning point were twofold. First, the resulting trade-weighted appreciation of the baht began to undermine the competitiveness of Thailand’s export industries. Second, the central bank was forced to keep interest rates relatively high to maintain its US dollar peg.

Trump will bring back ‘currency manipulator’ threat, unless China reins in North Korea

High local currency interest rates encouraged Thai businesses to borrow in US dollars to fund domestic investments. As they saw it, there was no currency risk, because the government guaranteed the baht’s exchange rate. And because exports were no longer so competitive, an increasing amount of their investment was channelled into sectors which promised fatter returns – especially property.

Within a few short years, Thailand’s current account swung from surplus to deficit, lending to the property sector tripled in what fast became a fully fledged property bubble, and Thailand’s short-term foreign currency debt ballooned, exceeding the Bank of Thailand’s foreign exchange reserves. In short, all the conditions were in place for a classic currency crisis.

A foreign debt default by one of Thailand’s biggest property developers and the collapse of the country’s largest finance company were all the signals opportunist investors needed to see that things were going badly wrong. Foreign funds and banks borrowed the baht heavily, selling the currency in the foreign exchange market in the expectation that the central bank would be forced to abandon its peg to the US dollar and devalue the currency, which would allow the speculators to cover their positions at a handsome profit.

Beijing promises currency reforms, but on its timetable

The Thai authorities fought back. They cut off access to baht funds, pushing short-term interest rates to 25 per cent and more. And the central bank punted almost all its foreign exchange reserves in off-balance-sheet currency transactions in a bid to squeeze out the shorts. Indeed, at a couple of points, Thai officials even declared victory over the speculators.

To no avail. On July 2, a day after the prime minister declared “I will never allow the baht to devalue”, the government bowed to the inevitable and floated the currency, causing an immediate 20 per cent devaluation.

The rest is history. The crisis spread to Asian economies including Malaysia, Indonesia and South Korea in a panic that at one point saw the Indonesian rupiah lose more than 80 per cent of its value against the US dollar, as local borrowers rushed to cover their foreign currency debts. Many defaulted, banks across Asia collapsed, and the region plunged into a traumatic recession that has scarred policymaking ever since.

Among those who learned their lesson were Chinese policymakers. They concluded that the very last thing a developing economy should do is to open its capital account to free inflows and outflows of investment capital. Such opening leaves an economy with a fragile financial system vulnerable to sudden outflows which can precipitate a financial collapse. As a result, although in recent years China has experienced a credit boom in some ways reminiscent of Thailand’s in the 1990s, there is minimal chance that China will suffer a Thai-style currency crisis any time soon.

Those who failed to learn from the Asian crisis include Europe’s policymakers. Devaluation and default may have been painful. But the economies of both Thailand and Indonesia were growing again within two years, thanks to their greatly improved competitiveness. In South Korea the recovery was even faster, with real incomes back to pre-crisis levels by the end of 1999.

With no devaluation, more than seven years after the start of its own debt crisis, Greece continues to struggle.

Finally, there are those who learned their lesson at the time, but who appear to have forgotten it since. After the crisis, many emerging markets foreswore foreign debt, and built up hefty reserves to cushion the impact of any future outflows. Yet in recent years the aversion to foreign currency debt has largely worn off. In 2015, the Bank for International Settlements warned that non-banks outside the US had accumulated some US$10 trillion in US dollar debt, with many of the borrowers concentrated in developing economies. With interest rates low, that build-up hasn’t caused much of a problem. But as the US Federal Reserve increases interest rates and begins to shrink its bloated balance sheet, potentially squeezing the supply of US dollar liquidity abroad, the chances of a painful re-run of the Thai currency crisis of 1997 grow.

Tom Holland is a former SCMP staffer who has been writing about Asian affairs for more than 20 years