(Bloomberg) -- Refining, long one of the more predictable corners of the oil market, is caught in a climate bind.

Environmental pressure and questions over long-term demand are prompting global energy companies, financiers and governments to edge away from fossil fuel investments, curbing the world’s oil processing capacity. And yet, today, appetite for everything from jet fuel to gasoline continues to grow apace, particularly in the world’s large emerging economies.

The result is a mismatch emblematic of the challenges of the energy transition — one that has left prices more volatile than ever, and consumers perilously exposed to any supply disruption, including turmoil triggered by global warming.

“Any small, operational shocks will create large market shocks, which will find their way down to the consumer’s pocket,” said Janiv Shah, senior downstream analyst at Rystad Energy.

Oil demand growth has outpaced the increase in refinery capacity since 2021, and this will continue through 2027, according to industry consultant FGE. After 2028, there are no confirmed new refinery projects, it said, though there will likely be projects undertaken in Asia and the Middle East.

Read More: The World Is Struggling to Make Enough Diesel

Of course, as the global vehicle fleet electrifies and oil consumption for transport eases, that supply-demand gap will close — but it will not do so fast and that leaves ample room for trouble.

All the while, long-term changes to the planet’s climate, including more frequent spells of extreme heat that already hit oil processing this summer, are also reducing the industry’s ability to cope with additional shocks, like Russia’s invasion of Ukraine last year, which upended hydrocarbon markets.

“The refining system is structurally tight,” said Nikhil Bhandari, Goldman Sachs Group Inc’s co-head of APAC natural resources and clean energy research. “That’s because of the backdrop where we’ve had 4% to 5% of global refining capacity closing in the last five years.” Global refinery processing rates this year are near record highs, according to the bank’s data going back to 2006.

With refining seen as especially environmentally unfriendly, Europe and the US have been phasing out older plants, along with Australia, Japan, and New Zealand. Global majors have cut smaller operations. Refining investment has instead been led by Asia, the Middle East, Africa and Latin America, with massive refineries such as Pemex’s Olmeca and Nigeria’s Dangote, owned by Africa’s richest man, Aliko Dangote.

But today even in China, long a net fuel exporter, there is little spare capacity to increase shipments significantly over the next two years to cope with strong demand. 

Plants there are already running at about 88% utilization, leaving little room for more, according to Parsley Ong, head of Asian energy and chemicals at JPMorgan Chase & Co. “Refineries are already running at the highest utilization rates in recent history.”

Read More: ‘There’s No Plan B’: Oil Chiefs Sound Alarm on Refining Woes

Globally, Ong estimates 1.9 million barrels per day of refining capacity will be added this year — but shutdowns will amount to 600,000. By 2025, she expects the capacity increase will be 1.4 million bpd of capacity, with shutdowns at 900,000.

“Nobody’s really adding capacity. Everyone is getting rid of it, in order to build chemicals or new materials.”

The strain is already showing. Europe leans on older facilities that have seen a spate of unplanned outages as they run higher-than-usual average operating rates, leaving nations facing the possibly of a winter with insufficient diesel. All this at a time when appetite remains strong, driving up prices. In the US, gasoline prices are at the highest seasonal level in more than a decade and diesel futures have just hit a record. Globally, the workhorse industrial fuel has outpaced crude.

Supply remains precarious. Across five key oil hubs across the world, inventories of light and middle-distillate fuels — the likes of gasoline, diesel and jet fuel — are currently below five-year seasonal norms, according to a report by FGE last week. 

“It’s hard to say if we’re moving away from oil too quickly. From an environmental perspective, you can’t move quickly enough,” said Steve Sawyer, director of refining at FGE. “Politicians are doing their job to meet people’s demands.” 

“But peak demand for oil may take longer than what these politicians would like.”

--With assistance from Sharon Cho.

©2023 Bloomberg L.P.