A funny thing happens when countries can no longer afford massive subsidies to keep down the cost to consumers of fossil fuels: the governments stop paying, and their country stops dead, or changes governments. Cheap fuel was once a perk for anyone who happened to live in an oil-rich country. But the perk has become an entitlement, and woe betide the country who, upon discovering it is not in fact oil rich anymore, tries to balance the books by charging its people the actual cost of fuel.

Nigeria is Africa’s largest oil exporter, and third largest economy, yet it has desperate needs for investment in roads, power generation and water systems. The two principal reasons these needs have been unmet are generations of rampant government corruption, and the roughly $8 billion a year in fuel subsidies. In March, a new government won election on promises to stop the corruption and the subsidies.

Fuel importers (Nigeria exports crude but does not have the refinery capacity to meet its domestic needs for fuels), fearful that they were going to lose a lot of business, stopped delivering product until the government paid its past due bills of nearly a billion dollars. The country has come to a standstill, with cars, trucks, buses and airplanes idled, electricity scarce, prices rising and unrest spreading.

It’s a repeat of what happened in 2012, when the country changed governments, and the outgoing government stopped the fuel subsidies. Chaos ensued, a massive strike shut down the country. And it stayed shut down until the subsidies were partially restored.

The iron jaws of this conundrum are closing on oil producers all over the world, from Saudi Arabia to Venezuela. Using oil profits to subsidize domestic consumption has become increasingly costly, because the subsidies inflate consumption while production of oil remains flat or declines. The problem was bad and getting worse long before oil prices tanked last year; now it has become a mortal threat to oil producing nations everywhere.

Iran, which like Nigeria has tried before to end its fuel subsidies only to back down in the face of immediate public unrest, last week announced it would try again. It raised fuel prices by 40%, hoping to raise nearly two billion dollars a year without sending people into the streets.

During the past few years several countries have faced first financial, then social stress as they tried to come to grips with the implacable problem. They include Malaysia, Indonesia, Sudan, India, Brazil, Yemen, and others.

The problem is not limited to those countries that pay overt subsidies to reduce pump prices. The United States, through tax breaks and production subsidies, gives $37.5 billion a year to fossil fuel companies (including coal and gas), without apparently affecting consumer prices. (see “Money for Nothing: The Case for Eliminating US Fossil Fuel Subsidies.”) While the US is not being squeezed by simultaneously declining oil revenues and rising subsidy demands, it is handing over to private, highly profitable corporations billions of dollars that could be used, for example, to shore up the country’s decaying bridges.

While the world pretends to be awash in surplus oil at the moment, it really isn’t, world crude oil production has been flat or declining since 2005. In the coming years the noose of declining supplies will tighten first and most drastically on those countries that in effect paid their people to burn more fuel faster when it was summertime, and the living was easy.