WHEN Lehman Brothers collapsed in 2008 and the world economy entered its worst slump since the Great Depression, Canada stood out as a haven of tranquillity. Its economy contracted along with those of other rich countries. But Canadian borrowers and banks had not indulged in the subprime follies of the United States and parts of Europe. Its recession was milder and its recovery stronger, partly thanks to higher oil prices. Canada performed so well that Britain poached its central-bank governor, Mark Carney, to run the Bank of England.

Now there is reason to wonder whether Canada, rather than holding back from the revels, just showed up late. With encouragement from ultra-low interest rates, Canadian consumers are on a borrowing spree. Consumer debt is a record 165% of disposable income (see chart). Most of that borrowing has gone into buying houses, which now look scarily overpriced. Against disposable income they are overvalued by 34% compared with their long-term average, according to The Economist’s house-price indicators. Compared with rents, the overvaluation is 89%.

Now the economy is shaky, which makes inflated debt and housing values more dangerous. The 50% fall in oil prices since 2014 battered the energy sector. Overall, the economy contracted slightly in the first half of 2015; the downturn was worst in oil-producing Alberta. The economy is now growing again and forecasts are relatively cheery. The oil slump pulled down the Canadian dollar, which makes exports more competitive; the United States, by far Canada’s biggest market, is growing.

But household debt casts an ominous shadow. At present, borrowers can pay; interest costs have fallen in relation to disposable income. But that could quickly change. Any shock in the form of inflation, which could force interest rates up quickly, or a recession in emerging markets or the United States, would be magnified by Canada’s overblown debt. Even so, an American-style financial crisis looks unlikely. That is because, despite the binge, Canadians have remained relatively sober. About 5% of Canada’s mortgages are subprime, compared with nearly a quarter of America’s before the crash. Two-thirds are insured by the government-owned Canada Mortgage and Housing Corporation or one of its smaller private competitors. For uninsured mortgages, lenders typically demand that home buyers put up half of a property’s value. Unlike American borrowers, Canadian ones do not use their homes as ATMs to pay for consumption. Banks do extend home-equity loans, but they are almost always the same banks that extended the mortgages; they therefore have a full picture of the customer’s finances, says David Beattie of Moody’s, a credit-rating agency. Canadian self-restraint is encouraged by the cosiness of its banking market. Half a dozen banks hold 95% of the assets. Competition among them is not cut-throat and profit margins are thus comfortable. Even if economic growth slows sharply or interest rates rise rapidly, “I don’t see massive losses impacting the capital bases of Canadian banks,” says Mr Beattie.

That does not mean Canadians can just relax and enjoy themselves. For one thing, the banks’ protection is the government’s exposure. The availability of publicly guaranteed insurance helps fuel the rise in house prices, and puts taxpayers at risk should the market crash. A study by the C.D. Howe Institute, a think-tank, found that in a severe housing crash the government would have to put up C$9 billion ($7 billion) to recapitalise mortgage insurers. A bigger risk is that banks would abandon private insurers, which have less government protection, further destabilising the market. The government has been trying to restrain the rise in house prices by tightening standards for mortgage insurance.

An economic downturn might not spell catastrophe. But the debt binge ensures it would be very unpleasant.