T HE DRILLING of the first modern well in Pennsylvania in 1859 set oil on a path that led to the heart of economics and geopolitics. Oil fuelled the rise of the West’s consumer culture; it helped determine who won the second world war and prompted a global economic crisis in the 1970s. Over the past 20 years China has become the second-biggest consumer of crude, while America’s fracking revolution has meant it is close to being a net energy exporter for the first time since the 1950s. Now a new chapter in oil’s story is unfolding: the prospect of stagnating or falling demand as the world shifts to cleaner energy. As in the past, this era promises startling economic and geopolitical change.

Consider the imminent stockmarket flotation of Saudi Aramco, which produces 10m barrels of oil a day, or 11% of the global total. As well as Arabian super-light, Aramco pumps out superlatives and controversy (see Briefing). Worth well over $1trn, it could, once listed, be the world’s most valuable public firm, squeezing past Apple. The initial public offering has been delayed several times; a big Aramco processing plant was hit by a missile strike in September and the firm is ultimately controlled by Muhammad bin Salman, an autocratic royal with blood on his hands. But take a moment to look beyond this. Aramco’s underlying strategy is to be the last oilman standing if the industry shrinks, pointing to the upheavals to come.

The term “peak oil” was coined in 1956 by M. King Hubbert, a geologist worried about the stuff running out. Today the phrase is back but for the opposite reason: the prospect of dwindling demand. That may seem odd given that this has grown by 1.4% a year since 2008. But the people running energy companies have long horizons, and on that timescale the picture for oil is darkened by urban pollution and climate change. Oil is responsible for a third of global energy use and a similar share of carbon emissions.

Many oil firms still say that production will creep up over the next decade, to slightly above today’s level of 95m barrels per day (b/d), and then plateau. But output will need to drop to 45m-70m b/d by 2050 if the world is to stop temperatures rising more than 1.5-2°C above their pre-industrial level. It would help, too, if there was a shift to cleaner oilfields, whose crude emits a fifth less than the dirtiest ones. Though oil bosses insist, in public at least, that oil remains the planet’s indispensable fuel, they can feel the growing stigma. Public opinion is shifting in the West, heralding tighter rules on emissions. And, in a sign of jumpiness, some Western firms have favoured short-term projects rather than sink their capital in decades-long bets on oil’s future.

If demand does fall, some products and producers are more vulnerable than others. Over a third of all oil is used in cars and lorries which could eventually be fitted with electric engines. It is harder to find a substitute for the oil in petrochemicals and plastics. Common sense suggests that the highest-cost and dirtiest oil firms will tend to go out of business first. If so, an industry that has become gargantuan over 160 years will shrink to a core of producers that fulfil the world’s residual demand at the lowest financial and environmental cost.

Many environmental activists fear this energy transition will never happen. But, in fact, it fits with Aramco’s strategy and pitch to investors. The firm spends just $3 to lift a barrel from beneath the desert, less than almost anyone else. The emissions from extracting Saudi oil are rock-bottom, too. Aramco is expanding in petrochemicals and locking in customers in Asia—in August it bought a $15bn stake in the chemicals arm of Reliance, an Indian giant. Saudi Arabia has promised investors they will get steady dividends whatever the weather. Implicit in the kingdom’s approach is that, if and when oil demand falters, Aramco will be the producer of last resort.

A cleaner planet is in everyone’s interests. But a shrinking oil industry could mean more, not less, turbulence for energy markets and geopolitics. Take energy markets first. The optimistic case is that supply and demand will taper down in tandem, and that the price of oil will fall along with the cost of producing the last barrel needed to satisfy ebbing demand. But downsizing an industry with $16trn of capital and at least 10m employees is never going to be smooth. Because oilfields naturally deplete, a drought in capital spending could cause a price spike. Each firm and country, including Saudi Arabia, will face a choice between holding back supply so as to bolster profits and tax revenues and opening the taps to grab market share and use up reserves, whatever the price, before it is too late. The OPEC cartel, which combines high- and low-cost producers, could implode. And as production focuses on fewer fields, the risk of disruption from terrorism or accidents will rise.

The political implications are just as big. Twenty-six countries rely on oil income for 5% or more of their GDP , says the World Bank (the average for them is 18%). If economic logic prevails, producers with the dearest and dirtiest oil—including Algeria, Brazil, Canada, Nigeria and Venezuela—should wind down output, but that would be painful and, for some, devastating. America, meanwhile, remains wedded to oil, which meets 40% of its energy needs. Its thirst has been satisfied by the fracking boom, especially in the Permian basin in Texas. Yet fracking is dirty and new projects need an oil price of $40-50 a barrel to break-even, at least twice the level Aramco requires. For the sake of the climate and efficiency, the fracking industry should eventually shrink. That, though, would make America more reliant on foreigners, just as its politics have turned inward.

Till kingdom come