When Bob Dudley, chief executive officer of British oil giant BP Plc, was asked at a recent conference when oil demand will peak, he had a precise answer: June 2, 2042.  The audience at the annual St. Petersburg International Economic Forum burst into laughter, knowing it’s impossible to predict such an event down to the day. But the American executive wasn’t speaking entirely in jest: The most recent edition of BP’s widely scrutinized Energy Outlook has global demand for crude maxing out in 2½ decades, give or take a year. That projection casts a shadow over one of the world’s largest industries, which until recently was far more concerned with boosting supply. The advent of electric cars, the fight against climate change, and slowing economic growth in China is dampening the world’s once boundless appetite for crude. Carmaker Volvo AB announced on July 5 that it will manufacture only electric or hybrid models from 2019 onward. Three days later, France said it would ban sales of cars with diesel and gasoline engines starting in 2040.

Patrick Pouyanne, CEO of Total SA, says demand will peak at some point in the 2040s, which is why the French energy giant he runs has been investing in solar power. Ben van Beurden, CEO of Royal Dutch Shell Plc, has said the zenith could arrive a lot sooner, in the next 15 years or so, if electric cars became really popular. “The energy transition is unstoppable,” Van Beurden told the St. Petersburg forum in early June. “In the most aggressive scenario, you can see oil already peaking in late 2020s or early 2030s.” In the time scale of the oil industry, where multibillion-dollar projects often take a decade or longer to come to fruition, that’s as close as it gets to saying “the day after tomorrow.”  If such forecasts prove right, oil prices are likely to remain low for a lot longer. That raises the possibility that some hard-to-reach deposits, like those in the Arctic, may never be tapped, turning what today are considered valuable reserves into assets of questionable worth. That worries big institutional investors such as BlackRock Inc. that manage mutual funds composed of energy stocks.

Oil companies may still adapt by diversifying into petrochemicals, for which demand is expected to keep climbing, and renewables such as solar, wind, and biofuels. Natural gas demand will also continue to grow, which is good news for companies like Exxon Mobil Corp. and Shell that have invested heavily in liquefied natural gas for export.  For Middle East nations that sit on huge hydrocarbon reserves, peak demand is more of an existential threat. “If you have 100 years’ worth of oil reserves, then 25 years looks like a very short time frame,” says Martijn Rats, a Morgan Stanley oil analyst in London. Saudi Arabia and Kuwait depend on oil for as much as 90 percent of their income. They and other Middle East nations have used their oil wealth to provide their populations with well-paid employment in the public sector and generous handouts—a tacit social contract underpinning their absolute petromonarchies.  The current bout of low prices offers clues about how these countries would handle a permanent drop-off in demand. With oil revenues sharply down, Middle East producers are dipping into their foreign exchange reserves—Saudi Arabia has drawn almost $250 billion since mid-2014. They’re also borrowing more. The combined public debt of Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, and the United Arab Emirates is set to jump to almost $800 billion by 2020, more than double its 2015 level, according to the International Institute of Finance, a group representing large banks. The situation is direst in such places as Nigeria and Venezuela, where corruption and mismanagement have drained state coffers.