After rivals such as Tesla Inc. were delayed by Shanghai’s shutdown, China’s BYD Co. is once again the biggest shipper of electric vehicles in the world’s top market with 57.4k April shipments, while Tesla recorded 1.5k shipments in April.

The Warren Buffett-backed automaker is also working on plans to get a longer-term competitive advantage over competitors by becoming more actively involved in lithium mining, a critical raw ingredient for EV batteries.

BYD said in March that it would invest up to 3 billion yuan ($449 million) in Chengxin Lithium Group Co., a lithium supplier with projects and interests in China’s Sichuan region as well as Indonesia and Argentina. The automaker was awarded a contract to produce the metal in Chile, the world’s second-largest lithium producer, in January.

According to a Chinese media report published last week, the carmaker has struck a deal to purchase six African mines capable of generating enough lithium to power more than 27 million electric vehicles. According to a claim by The Paper, a Chinese digital publication, this may be enough to meet BYD’s lithium requirement for the next ten years. Requests for comment from BYD have gone unanswered.

According to a note from Daiwa Capital Markets, BYD’s alleged buying binge in Africa shows the company expects “a prolonged lithium scarcity.”

After a year of rising costs that forced several manufacturers, including BYD, to boost sticker prices, many automakers are considering a deeper role in their supply chains, including the mining and processing of critical battery metals. Lithium prices have risen roughly 500 percent in a year, and metals remain high, despite early indications that the increases are slowing.

For the first time in more than a decade, electric vehicle battery prices are anticipated to rise this year, and wider inflation might push back to the day when electric vehicles become as inexpensive as conventional vehicles.

Although Tesla CEO Elon Musk said in April that the firm “might actually have to get into the mining and refining directly at scale” and that the company had obtained rights to a lithium clay deposit in Nevada two years ago, the business has primarily focused on securing future supply contracts with existing producers. Liontown Resources Ltd., which is constructing a facility in Western Australia, said on Monday that it expects to start supplying material to Toyota in 2024.

There are a number of possible problems for automakers considering a move into commodity manufacturing. The mining industry has a shaky track record of completing projects on time; a surge of resource nationalism is complicating growth in a number of significant countries, and ESG investors are examining extractive sectors for possible damage to the environment.

Last week, Seth Goldstein, a Chicago-based equity strategist at Morningstar Research Services, warned me that securing sufficient raw material supply will be “the largest difficulty for all autos for most of this decade.”

The ideal answer, according to Goldstein, is for carmakers to sign longer-term deals with the industry’s largest suppliers, such as Albemarle Corp. and Ganfeng Lithium Co., which have the most potential to bring on additional supply.

“Investing in junior miners who have never produced lithium or in innovative technologies is relatively hazardous and might result in a lack of lithium,” he warned.