Elon Musk says there's big money to be made by turning raw lithium into battery chemicals, but shrinking profit margins suggest the mining end of the business might still be a better bet.

Musk last month described lithium refining as the hard part in the complex process of getting raw materials out of the ground and into Tesla Inc.'s cars. For those who can crack it, it's a "license to print money," he said.

And he was right: margins did spike earlier this year, as booming orders from carmakers drove a record surge in prices for the specialty chemicals produced by "merchant refiners," companies that purchase and process material from lithium producers.

But the refiners' profits can quickly wither if the cost of raw materials rises faster than the price of the lithium chemicals they sell. While China's COVID lockdowns have weighed on demand for finished products from battery- and automakers in recent months, the price of mined raw materials has continued to surge.

As a result, profit margins at lithium plants have tumbled. Processors are still generating historically strong earnings, but margins have dropped by more than half from a March peak, according to Fastmarkets Ltd, which tracks prices for lithium products and other commodities.

The reversal is a reminder of how refiners and the entire electric-vehicle supply chain are at the mercy of the miners and their ability to bring on new production quickly enough to meet spiraling demand. Delayed supply responses are commonplace in other commodities markets, which is why the lion's share of profits are typically made in mining, not refining.

"Merchant refining can be a pretty horrible place to be in any commodity market, because you can get squeezed at both ends," said Peter Hannah, a senior price development manager at Fastmarkets. "I don't think these margins will be a long-term feature of the market."

Producers, meanwhile, continue to earn big. Chile's SQM, the second-largest supplier, reported record quarterly profit late Wednesday and said it expects prices will remain high through the rest of the year.

While Musk's comments have thrust lithium refiners into the spotlight, Tesla and other carmakers are increasingly alert to the risk of a long-term mine-supply crunch. Carmakers including Ford Motor Co. and General Motors Co. have been signing a flurry of long-term supply deals for battery metals in recent months with both miners and processors, as spiking prices underscore the risk that EV expansion plans could stall without access to adequate raw materials.

In a strategy that goes against the grain of the industry's traditional just-in-time procurement practices, they're now increasingly striking deals with miners directly, even in cases where the projects are years away from production.

"There's no lack of lithium, but there just aren't enough projects that will be up and running in time to meet demand in that time frame," said Max Reid, a battery raw materials analyst at Wood Mackenzie. "We're reasonably confident that there will be a deficit opening up in 2030 due primarily due to lack of new investment in the early days of this decade."

Tesla has led the charge in shifting the industry's approach to sourcing, even buying mining rights in Nevada in 2020.

With prices for lithium chemicals holding at sky-high levels and mined raw materials known as spodumene continuing to surge, Musk has hinted at further forays, going so far as to offer an ultimatum to the industry on an investor call last month.

"If our suppliers don't solve these problems, then we will," he said.

Mark Burton reports for Bloomberg News.

Copyright 2022 Bloomberg. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.