China is outmaneuvering the U.S. and other countries in the global scramble for a vital element for electric cars.

As demand for the vehicles surges, Chinese companies have been doing deals around the world to secure supplies of lithium, a silvery-white metal mined from rocks in Australia and brine pools in South America.

China is the top market for electric and hybrid cars, accounting for roughly half of global sales, and the government is pushing the development of the industry within its borders. That calls for a lot of lithium, a key component of the vehicles' batteries.

"Whoever controls the lithium supply chain will control the future of the electric vehicle space," said Simon Moores, managing director at research and data provider Benchmark Mineral Intelligence. "There's a global battery arms race."

Related: How China plans to beat the U.S. at technology

China has limited lithium resources of its own, so it's looking abroad.

In September, Chinese automaker Great Wall Motor (GWLLF) bought a stake in Pilbara Minerals (PILBF), an Australian lithium miner. Earlier this year, China's Ganfeng Lithium snapped up 20% of an Argentine project. Last year, China's Tianqi Lithium took a 2% stake in Chile's SQM (SQM), one of the world's top miners of the metal.

The Chinese government has been quietly instructing state-owned enterprises to hunt down lithium resources outside China, according to Francois Perrin, a portfolio manager at investment firm East Capital. He predicts that over the next few years, China will wield increasing influence over the supply of lithium and other metals used in electric batteries.

Chinese Foreign Ministry spokesman Geng Shuang said he didn't have any specific information on the trend of Chinese investment in lithium supplies.

"We always strive to deepen economic cooperation with all countries in all fields, including in energy and auto sectors," he said in response to a question from CNN. "I wouldn't find it surprising if there is Chinese cooperation with other countries in mining certain minerals."

The Chinese firms involved in the recent deals didn't respond to requests for comment. Neither did the National Development and Reform Commission, which helps guide the country's economic policies.

Beijing has a track record of directing Chinese companies to do its bidding, such as squeezing South Korea's tourism industry earlier this year over a dispute with Seoul over a U.S. missile defense system.

It also has history of using crucial natural resources under its control as diplomatic weapons: it was widely accused of restricting exports in 2010 of a group of minerals that are vital for many high-tech devices.

The pursuit of lithium for electric cars fits with Chinese President Xi Jinping's plans, according to analysts.

"China's aggressive moves in the lithium sector speak to the country taking leadership around important issues such as public health and fighting climate change," said Chris Berry, founder of research firm House Mountain Partners. China wants to be a global leader in lithium, from mining the metal to processing it, he said.

Related: These countries want to ban gas and diesel cars

Western companies haven't so far shown much interest in the kinds of investments for electric cars made by their Chinese counterparts, according to experts.

"They're late to the party," Moores said.

Like China, the U.S. and Europe have few lithium resources of their own and rely on supplies shipped from elsewhere. Tesla (TSLA) and other electric car makers could end up scrambling for a limited supply of crucial resources where China is the biggest player.

The growing global appetite for lithium is already driving up its price. It's gained 40% since the start of the year to trade around $14,000 per ton, according to Benchmark Mineral Intelligence.

"This is an incredible bull market like lithium's never seen," Moores said.

A lot of the demand comes from China's large and growing battery manufacturing industry.

Tesla's huge Gigafactory in the Nevada desert gets a lot of headlines, but China produces about two-thirds of the global supply of batteries for electric vehicles, according to Benchmark Mineral Intelligence. And the firm estimates that China is building about half of the 20 or more battery mega-factories currently in the works.

Related: Inside Tesla's enormous Gigafactory

With the biggest market for electric vehicles and the biggest battery supply, China is making itself an inescapable destination for global automakers. They have been lining up recently to announce plans to make their electric cars in the country.

"The message to Tesla and other aspiring electric vehicle makers: 'You are free to produce anywhere in the world, but better to produce electric vehicles inside China,'" said Michael Dunne, head of Hong Kong-based consultant Dunne Automotive.

Tesla has said its working on plans for building its cars in China. Volkswagen (VLKAY), the world's biggest automaker, has just announced a $12 billion plan to make electric cars in the country. Experts say others will soon follow.

Related: Volkswagen needs batteries that would fill 4 Gigafactories

And it's not just lithium that China's locking down.

Cobalt, another metal used to make electric vehicle batteries, is even scarcer. Almost two-thirds of supply is mined in the Democratic Republic of Congo, a war-torn country in central Africa.

Last year, China bought a majority stake in Congo's biggest cobalt mine for more than $2.5 billion, helping secure long-term supply of the metal. Since that deal, the price of cobalt has more than doubled.

"The cobalt supply situation is a serious concern," Perrin said.