A surge in demand for electric vehicles is sending the price of raw materials soaring, threatening to slow the push toward making cheaper batteries that are key to more widespread adoption.

Lithium, the mainstay for rechargeable power packs used in EVs, is roaring back after a three-year slump in prices, while cobalt surged about 57% last quarter. Nickel jumped to a more-than six-year high earlier this year on optimism about the clean energy transition, though fell in March on plans by a top Chinese producer to beef up its battery business.

China is the biggest player in EV batteries, with the majority of the world’s capacity, and has a stranglehold over the processing of crucial battery materials. With demand building, producers are striving to make cheaper batteries — the most expensive components of EVs, accounting for about 30% of the total cost.