For more than a century, the world’s appetite for fossil fuels has been expanding relentlessly, as humans have continued burning larger amounts of coal, oil and natural gas almost every year to power homes, cars and factories.

But a remarkable shift may soon be at hand. The world’s leading energy agency now predicts that global demand for oil, natural gas and coal will peak by 2030, partly driven by policies that countries have already adopted to promote cleaner forms of energy and transportation.

A peak in fossil fuel use won’t be enough to stop global warming, the International Energy Agency said in its World Energy Outlook, a 354-page report on global energy trends published Tuesday. To do that, emissions from coal, oil and natural gas would need to fall to nearly zero. But a sweeping transformation of the global energy landscape is underway.

By 2030, there could be 10 times as many electric vehicles on the road as there are today, the report said. Renewable energy sources such as solar, wind and hydropower could supply 50 percent of the world’s electricity, up from 30 percent today. Heat pumps and other electric heating systems could outsell gas and oil furnaces. Global investment in offshore wind farms could surpass that in coal and gas power plants.

If that all came to pass, oil and gas demand would most likely plateau at slightly above today’s levels for the next three decades, expanding in developing countries and shrinking in advanced economies. Demand for coal, the dirtiest of fossil fuels, would start declining, though it might fluctuate year to year if, say, coal plants needed to run more often during heat waves or droughts.

“The transition to clean energy is happening worldwide and it’s unstoppable,” said Fatih Birol, executive director of the International Energy Agency. “It’s not a question of ‘if,’ it’s just a matter of ‘how soon’ — and the sooner the better for all of us.”

The agency’s prediction of a peak in fossil fuel demand by 2030 has created controversy. After Mr. Birol first suggested the possibility in September, the oil cartel OPEC warned that such forecasts were highly uncertain and could lead countries and companies to underinvest in oil and gas drilling. If demand for fossil fuels did not fall as expected, the cartel said, the lack of supply could lead to “energy chaos.”

OPEC issued its own outlook last year projecting that global demand for oil and natural gas would keep rising until 2045.

“I have a gentle suggestion to oil executives, they only talk among themselves,” Mr. Birol said in an interview. “They should talk to car manufacturers, to the heat pump industry, to the renewable industry, to investors — and see what they all think the future of energy looks like.”

In the United States, large oil companies have been buying up smaller rivals in recent weeks, a sign of confidence that fossil fuels are likely to play a major role for years to come. On Monday, Chevron announced plans to buy Hess for $53 billion, two weeks after Exxon Mobil said it would buy Pioneer Natural Resources for $59.5 billion. In both deals, the oil giants acquired large shale reserves in places like Texas and North Dakota, where production could be ramped up and down relatively quickly — a possible advantage in a world where the outlook for demand is uncertain, analysts said.

Predictions about global energy trends are notoriously difficult, and the International Energy Agency has been wrong before. In 2016, the agency suggested that China’s demand for coal had peaked, but coal use later soared to new levels. On the other hand, the agency has previously underestimated the rapid growth of cleaner technologies like solar power.

This year’s report says China will play an outsize role in determining the world’s energy future. The country accounts for half the world’s coal use and has driven two-thirds of the growth in global oil demand over the past decade. But China’s appetite for steel and cement could be leveling off, the report said, which would put a dent in fossil fuel demand.

The agency’s forecasts could change if countries altered their energy policies. For example, electric cars are currently projected to make up 50 percent of new sales in the United States by 2030, thanks to tax breaks in the Inflation Reduction Act. But several Republican presidential candidates, including former President Donald J. Trump, want to end those incentives.

High oil and natural gas prices of late, driven by Russia’s invasion of Ukraine and renewed conflict in the Middle East, could also lead countries to use fewer fossil fuels. During past oil crises, such as in the 1970s, people had few alternatives and had to suffer through price spikes, said Amy Myers Jaffe, an energy expert at the New York University School of Professional Studies. But today is different.

“When prices are high, we can see a quicker drop-off in demand now than we did in the 1970s,” Ms. Jaffe said. “We don’t really use oil for electricity anymore, alternatives like electric cars have become widely available, and working from home means at least some people can commute less. It’s a very different world.”

A plateau in global oil and gas demand could cause energy prices to become more volatile in the short term, said Jason Bordoff, founding director of the Center on Global Energy Policy at Columbia University.

“The oil industry has obviously seen boom and bust periods in the past, but it was always clear that demand would keep going higher over the long term,” Mr. Bordoff said. “Now there’s much more uncertainty as to what will happen.”

Even if fossil fuel demand peaks this decade, the world will still need much more stringent climate policies to prevent global warming from surpassing 1.5 degrees Celsius, or 2.7 degrees Fahrenheit, a goal many world leaders have endorsed in order to lessen the risk of catastrophic climate disruptions.

In a report last month, the International Energy Agency outlined some possibilities, including bans on gasoline-powered cars and further investments in electric grids and technologies such as nuclear power or clean hydrogen.

“A peak in fossil fuel demand would be significant, but meeting our climate goals would require a sharp decline at a scale and pace we haven’t seen yet,” Mr. Bordoff said.