FOR too long, the news from the Middle East has been of nothing but war, terror and revolution. Yet for some countries recent times have quietly been, until very lately, pretty comfortable. A decade of high oil prices has left the region’s oil exporters with more than $2.5 trillion in accumulated sovereign assets along with scads of fancy toys: whole new cities, new highways, railways, factories, ports and airports, not to mention heaving arsenals of the latest weaponry.

That pile has cushioned them so far against serious fallout from last year’s collapse in global oil prices. Overall, the finances of Middle Eastern oil producers are in far better shape than those of shakier oil rivals such as Venezuela and Nigeria. But with no signs of an end to the world’s current oil glut, fears are mounting of a sustained trough. Behind closed doors and in social media, the talk in the region is of a repeat of the 1980s, a grim era for oil producers when revenues not only crashed, but stayed depressed for nearly 20 years.

It is impossible to predict that far ahead, and the effects of even a far shorter slump are likely to differ from country to country. Qatar, for example, has so few citizens and so much money that it could, at a pinch, survive for years on income from overseas investments, such as its estimated $10 billion-worth of London property. By contrast Algeria, with 40m people, faces a far more immediate squeeze. It ran a trade deficit of $8 billion in the seven months to August (roughly 7% of GDP when annualised) compared with a $4 billion surplus in the same period last year; its currency has lost a quarter of its value against the dollar.

Algeria also harbours dark memories of that earlier slump. The oil-price collapse of the 1980s put an end to the social contract whereby the government provided jobs and generous welfare in exchange for neutered politics. As wages dropped and inflation and unemployment surged, riots erupted, followed by political turmoil and then, during the 1990s, civil war.

Algeria’s generals eventually won the upper hand, decimating and exhausting their Islamist opponents. But what sealed the fragile peace was the return of the same social contract, made possible by an upturn in oil prices. When the Arab spring broke out in 2011, Algeria stayed quiet. This was not only because its people knew all too well the danger of revolt, but because the pouvoir—as Algerians call the cabal of generals and apparatchiks who run the country—could afford a big boost in wages and public spending on infrastructure. Despite chronic unrest and an ageing leadership—President Abdelaziz Bouteflika is a very frail 78—Algeria is not in immediate danger of a relapse. The oil boom left it with little debt and hefty reserves. Yet these have already declined by nearly $20 billion from a peak of $194 billion last year. Algeria still relies on oil and gas for 95% of its exports and the vast bulk of its state revenue. Last year, when the price collapse from triple digits to under $50 per barrel was just setting in, the government ran a deficit of 6.8% of GDP. With its income likely to fall by half this year, a burden of state subsidies that consumes 13% of GDP, and youth unemployment already pushing 25%, it is no wonder that Algeria’s government recently called for an emergency meeting of OPEC, the oil-export cartel, to find a way to boost prices. The big Arab Gulf producers, led by Saudi Arabia, ignored the call. They not only have a far larger buffer of savings. They are, in effect, driving the price plunge in pursuit of a long-term strategy. This, too, is based on experience from the 1970s and 1980s. As our first chart shows, oil producers learned then that when the cartel pushed prices too high, consumers rushed to find other sources of energy. As a result, it took OPEC nearly 20 years to regain the market share it eventually lost. Already, the latest price crash has sharply scaled back plans to expand oil exploration and development elsewhere, but this has not yet affected production. A recent report by Saudi Arabia’s central bank bemoaned the fact that non-OPEC producers have proved “not as responsive to low oil prices as had been thought”. It called for more patience by OPEC “and a willingness to sustain current production until the demand catches up with the current supply levels”. That advice has not fallen on deaf ears: Saudi Arabia, along with Iraq and Oman, is pumping oil at record levels.