COBALT derives its name from Kobold, a mischievous German goblin who, according to legend, lurks underground. For centuries it vexed medieval miners by looking like a valuable ore that subsequently turned into worthless—and sometimes noxious—rubble. Once again it is threatening to cause trouble, this time in the growing market for batteries for electric vehicles (EVs), each of which uses about 10kg of cobalt. The source of mischief is no longer in Germany, though, but in China.

It is widely known that more than half of the world’s cobalt reserves and production are in one dangerously unstable country, the Democratic Republic of Congo. What is less well known is that four-fifths of the cobalt sulphates and oxides used to make the all-important cathodes for lithium-ion batteries are refined in China. (Much of the other 20% is processed in Finland, but its raw material, too, comes from a mine in Congo, majority-owned by a Chinese firm, China Molybdenum.)

On March 14th concerns about China’s grip on Congo’s cobalt production deepened when GEM, a Chinese battery maker, said it would acquire a third of the cobalt shipped by Glencore, the world’s biggest producer of the metal, between 2018 and 2020—equivalent to almost half of the world’s 110,000-tonne production in 2017. This is likely to add momentum to a rally that has pushed the price of cobalt up from an average of $26,500 a tonne in 2016 to above $90,000 a tonne.

It is not known whether non-Chinese battery, EV or consumer-electronics manufacturers have done similar, unannounced deals with Glencore. But Sam Jaffe of Cairn Energy Research Advisors, a consultancy, says it will be a severe blow to some firms. He likens the outcome of the deal to a game of musical chairs in which Chinese battery manufacturers have taken all but one of the seats. “Everybody else is frantically looking for that last empty chair.”

Mr Jaffe doubts the cobalt grab is an effort by Chinese firms to corner or manipulate the market for speculative ends. Instead, he says, they are likely to be driven by a “desperate need” to fulfil China’s ambitious plans to step up production of EVs.

Others see it more ominously. George Heppel of CRU, a consultancy, says that, in addition to GEM sweeping up such a sizeable chunk of Glencore’s output, China Moly may eventually ship its Congo cobalt home rather than to Finland, giving China as much as 95% of the cobalt-chemicals market. “A lot of our clients are South Korean and Japanese tech firms and it’s a big concern of theirs that so much of the world’s cobalt sulphate comes from China.” Memories are still fresh of a maritime squabble in 2010, during which China restricted exports of rare-earth metals vital to Japanese tech firms. China produces about 85% of the world’s rare earths.

Few analysts expect the cobalt market to soften soon. Production in Congo is likely to increase in the next few years, but some investment may be deterred by a recent five-fold leap in royalties on cobalt. Investment elsewhere is limited because cobalt is almost always mined alongside copper or nickel. Even at current prices, the quantities needed are not enough to justify production for cobalt alone.

But demand could explode if EVs surge in popularity. Mr Heppel says that, though most cobalt is currently mined for batteries in smartphones and for superalloys inside jet engines (see chart), its use for EVs could jump from 9,000 tonnes in 2017 to 107,000 tonnes in 2026. The resulting higher prices would eventually unlock new sources of supply. But already non-Chinese battery manufacturers are looking for ways to protect themselves from potential shortages. Their best answer to date is the other “goblin metal” closely associated with cobalt, nickel, whose name comes from a German spirit closely related to Old Nick. The materials most commonly used for cathodes in EV batteries are a combination of nickel, manganese and cobalt known as NMC, and one of nickel, cobalt and aluminium known as NCA. As cobalt has become pricier and scarcer, some battery makers have produced cobalt-lite cathodes by raising the nickel content—to as much as eight times the amount of cobalt. This allows the battery to run longer on a single charge, but makes it harder to manufacture and more prone to burst into flames. The trick is to get the balance right. Strangely, nickel has not had anything like cobalt’s price rise. Nor do the Chinese appear to covet it. Oliver Ramsbottom of McKinsey, a consultancy, says the reason for this relative indifference dates back to the commodities supercycle in 2000-12, when Indonesia and the Philippines ramped up production of class-2 nickel—in particular nickel pig iron, a lower-cost ingredient of stainless steel—until the bubble burst. The subsequent excess capacity and stock build-up caused nickel prices to plummet from $29,000 a tonne in 2011 to below $10,000 a tonne last year.

As yet, the demand for high-quality nickel suitable for EVs has not boosted production. Output of Class-1 nickel for EVs was only 35,000 tonnes last year, out of total nickel production of 2.1m tonnes. But by 2025 McKinsey expects EV-related nickel demand to rise 16-fold to 550,000 tonnes.

In theory, the best way to ensure sufficient supplies of both nickel and cobalt would be for prices to rise enough to make mining them together more profitable. But that would mean more expensive batteries, and thus electric vehicles. Only a goblin would relish such a conundrum.