The International Energy Agency (IEA) has warned that high mineral prices could delay a transition to clean energy, owing to the amount of metals needed for batteries, solar panels and wind turbines.

Reaching the goals of the Paris climate agreement would result in a quadrupling of mineral demand by 2040, the IEA said. Yet a lack of investment in new mines risks substantially raising the costs of clean energy technologies, it said in a report published on May 5.

“Meeting the climate goals will turbocharge demand for critical minerals,” Fatih Birol, executive director of the IEA, told the Financial Times. “It [the energy transition] could definitely slow down as a result of increasing costs.”

Prices for commodities—from lithium to cobalt—have rallied this year as demand for clean energy technologies has increased and governments have rolled out green stimulus packages. Sales of electric cars rose 41% last year, according to the IEA, with about 3 million sold globally.

“To have enough electric cars, wind turbines, hydrogen, solar, batteries—for these we need critical minerals at affordable prices otherwise it will be a formidable barrier to reach our climate goals,” Birol said.

The group of raw materials used in batteries is expected to garner the biggest surge in demand, the report said. Demand for lithium is set to grow more than 40 times if countries want to meet the goals of the Paris agreement, it said.

The IEA, which was founded in the 1970s to ensure the security of global oil supplies in the wake of the first Arab oil embargo, said critical minerals had now become key to countries’ energy security.

Production of critical minerals needed for clean energy technologies was much more concentrated than in the oil market, the IEA said. The Democratic Republic of Congo, for example, produces more than 60% of the world’s supplies of cobalt, an important battery material.

“Concerns about price volatility and security of supply do not disappear in an electrified, renewables-rich energy system,” it said.

Countries should consider stockpiling some of the critical minerals in order to hedge themselves against any shortfall in supply, Birol said.

“It is for me not a bad idea if some countries would build voluntary strategic stocks which can be helpful, especially for some of the critical minerals that are highly concentrated in a very few number of suppliers,” he said.

Birol warned that higher commodity prices could outweigh the cost reductions achieved by increased production in clean energy technologies such as batteries. If prices for lithium and nickel double, the cost of producing lithium-ion batteries for electric vehicles will increase by 6%.

Rising copper prices, which hit a 10-year high of more than $10,000 last week, could add half a trillion dollars to the costs of reaching climate goals in the next two decades, Birol added.

Yet investors are not investing enough in new mines. It takes on average more than 16 years for a mining project to go from discovery to first production, meaning investment is needed now, the IEA wrote.

“Investors are still not convinced that the governments are serious [about] reaching their climate goals,” Birol said. “There is not strong enough and clear enough signals given by policymakers about the speed and determination of the energy transition.”