President Donald Trump just publicly accused China of interfering in the 2018 US midterm elections in front of more than a dozen world leaders at a meeting of the United Nations Security Council.

“Regrettably, we found that China has been attempting to interfere in our upcoming 2018 election coming up in November against my administration,” Trump said on Wednesday. “They do not want me or us to win because I am the first president ever to challenge China on trade.“

Trump notably failed to mention Russia’s meddling in the 2016 presidential election and in the upcoming November vote. But US officials have warned about China’s interference efforts for months.

In August, National Security Adviser John Bolton named China as one of four countries — along with Russia, Iran, and North Korea — that aim to meddle in the midterms. And according to Director of National Intelligence Dan Coats, America’s top spy, China has the most skilled government hackers of the four countries.

Trump, chairing a UN Security Council meeting, is striking a notably hawkish tone about Iran pic.twitter.com/LDoKCgQb4v — Aaron Rupar (@atrupar) September 26, 2018

Beijing has a history of attacking the US in cyberspace. In 2009, it hacked Google in part to spy on the accounts of Chinese human rights activists and other dissidents. Five years later, Beijing hacked the US Office of Personnel Management’s database and stole sensitive information on around 22 million people who had or previously held security clearances in the US government.

But interfering in a US government election is wholly different from stealing secrets from the private sector. So why, if Trump’s accusations are true, would China be escalating its attacks all of a sudden?

Perhaps because the president is right: He started a trade war with China, and China wants it to stop. Removing him from office is the surest way to do that.

Why China hates Trump’s trade war

Trump has placed tariffs — taxes on imported goods — on roughly $250 billion worth of Chinese products since coming into office. He’s unhappy that the US imports more goods from China than it sends to other way and hopes that the tariffs will help close the $335.4 billion trade deficit.

Beijing has retaliated with tariffs of its own on US products, making it harder for US companies to sell in the Chinese market.

Three sources familiar with the Trump administration’s economic strategy toward China told me last week that the White House has two main objectives in the trade war.

The first is to remove China from the center of the global supply chain. Here’s one example of Beijing’s importance: Apple has around 27 China-based suppliers, mainly in the electrical components sector.

Imposing tariffs on Chinese products, some of which form parts in complicated items like automobiles, could prompt manufacturers to look elsewhere for those components. That would seriously hurt China’s economy as money flows to other companies in other countries.

The second goal is to make multinational corporations wary about doing business in China. If large companies — say, South Korea’s Samsung or America’s Google — decide it’s too expensive or too politically dangerous to operate in the country and choose to build plants elsewhere instead, that would also harm China’s economy.

There are already signs of stress in China. For instance, the New York Times reported Monday that because of the trade war, “many companies are considering cheaper places to make their products, like Vietnam, Cambodia, Bangladesh and Ethiopia.” Those countries may prove safer places to do business because they aren’t on the receiving end of billions in tariffs.

China, which for years has aimed for economic growth and stability in its society, sees the trade war as a threat that could soon lead to a sharp downturn in its economy and unhappy workers.

Three days ago, China took out four pages in the Des Moines Register newspaper in Iowa — a state that’s home to many American farmers as well as US Ambassador to China Terry Branstad — on how China is buying soybeans and other products outside of the US market.

It’s clear, then, why China might want Trump’s Republican Party out of power this November. The question now is if Trump’s pugilistic stance toward China is about to turn more confrontational. If it is, then the world’s two biggest economies may be in for an even bigger fight.