WHEN the oil price collapsed in the late 1990s, so did the capital of Europe’s oil-and-gas industry. Thousands of foreign workers had been flown to Aberdeen, on Scotland's north-east coast, to work on North Sea rigs. They left in droves and the local economy entered a mini-depression. How has the city responded to the latest oil crash? When oil prices plunged again last summer the omens did not look good: 40,000 jobs in Aberdeen (about a third of total employment) are dependent on oil and gas. Worse, getting oil out of North Sea reserves is expensive because much of it is difficult to extract. But in addition, the industry had grown fat on meaty oil prices over the past few years. Workers who weren't especially skilled commanded six-figure salaries. By 2012 Aberdeen had the most millionaires per person of any place in Britain, including London. Aberdeen’s high costs mean that it struggles to cope with cheaper oil more than, say, Saudi Arabia.

Walk around the Granite City—which, even in midsummer, can be a soggy experience—and it is clear that the oilmen have seen better days. Aberdeen’s fancy restaurants are two-thirds empty. The hotels—which are still outrageously expensive—are quieter. A recent report from BDO, a consultancy, found that in May hotel occupancy was 18% lower than last year. Taxi drivers’ knowledge of oilrigs is suspiciously comprehensive: many used to work on them. Alexander Kemp, an oil economist at the University of Aberdeen, reckons that the industry’s big annual shindig, which takes place in September, will be poorly attended.

But drill a little deeper and things do not look quite so bad. Although Aberdeen and Aberdeenshire were the only two of Scotland’s 32 local authorities to see an increase in unemployment last month compared with July 2014, it is still very low (at 4.2% and 2.8% respectively). Property prices are still steaming ahead: a report from Registers of Scotland found that over the past year home prices in Aberdeen rose by 8%, the second-fastest increase of any local authority.

A few things are helping to offset the consequences of lower oil prices. Production volumes from the North Sea have risen in recent months—in June output increased by 10% compared with the same month last year—as a number of large fields came back on stream following maintenance work. (Though that may be just a short-term blip.)

Also, in coming decades about £50 billion ($78 billion) of investment will be needed for “decommissioning” old rigs in the North Sea. Figures from Oil and Gas UK, an industry body, show that around three times more will be spent on decommissioning than in 2012. The Aberdeen Harbour Board is spending over £300m on a new harbour to the north of the current one, which will have room for bigger ships.

And Aberdeen’s economy is slowly diversifying. On August 18th the Press and Journal, a local newspaper, reported that Union Square, a big shopping centre near the train station, will undergo a facelift. City leaders hope that this will make Aberdeen a big draw for visitors from outside the town (though it is doubtful whether anyone really decides to visit a city just because of a few new coffee shops and department stores).

Mr Kemp points out that things could still get worse for Aberdeen. The oil price will not rise any time soon. Contracts are still coming up for renewal, and oil firms are pushing their contractors for big discounts. But a repeat of the oil bust that hit the city in 1996 looks highly unlikely.