China is the world leader when it comes to supplying rare-earth materials, and Beijing is ramping up the rhetoric and looks to be ready to weaponize that dominance in the ongoing trade war with the United States.

Chinese state-run media outlets published reports Wednesday, including an editorial in the top newspaper of China’s Communist Party, hinting at the possibility of cutting off exports of rare-earth materials to the U.S.

China supplies about 80% of the United States’ rare-earth imports, which are then used in everything from smartphones to electric vehicles.

The threat comes ahead of June’s G-20 summit, where presidents Donald Trump of the U.S. and Xi Jinping of China are scheduled to meet and continue negotiations for a new trade deal.

China is weighing retaliatory measures after the U.S. banned telecom giant Huawei from U.S. networks, cutting off the supply of American components and tech it needs.

“China, as the dominant producer of rare earths, has shown in the past that it can use rare earths as a bargaining chip when it comes to multilateral negotiations,” Northern Minerals CEO George Bauk told Bloomberg.

This indeed isn’t the first time China has issued such threats, as it previously targeted Japan in 2010 amid a dust-up over a detained Chinese fishing captain.

“We’ve been here before,” analyst Fraser Howie said on CNBC’s “Street Signs” on Wednesday. “What it tells you is that you do not want China having a critical role in your supply chain. Don’t become too dependent on China.”

The People’s Daily published an editorial Wednesday that said the U.S. is unwise to underestimate China’s resolve, writing “don’t say we didn’t warn you.” The phrase carries a lot of weight in China and was used before the country went to war with India in 1962 and again in 1979 before fighting broke out with Vietnam.

Xi visited a rare-earths plant in May, accompanied by his chief trade negotiator, raising the possibility he could weaponize the rare earths.

Shares of rare-earth miners skyrocketed Wednesday. In China, shares of JL Mag Rare-Earth and Innuovo Technology rose 10%, while Australian company Lynas saw its shares jump 15%.

Rare earths actually are found all over the planet, but China supplies the most largely due to environmental issues and pollution caused by their production. 

An industrial plant pollutes the air and produces hazardous waste in Baotou, Inner Mongolia, China.

Alavan Business Advisory Director Alastair Newton told CNBC that even if there is a new trade deal, this ongoing feud will turn into a tech cold war between the U.S. and China.

“Technology is where this battle is going to be fought out,” he said, “even if we do get a trade deal on bilateral goods.”