Amid his mounting political challenges at home, President Trump escalated tensions on the international stage in a rambling tirade on Wednesday, alleging that China is interfering in the upcoming U.S. election. Beijing’s goal, he charged, is to defeat Republicans and punish his Administration. “They do not want me, or us, to win, because I am the first President ever to challenge China on trade,” he told the fourteen other Security Council delegations, many led by heads of state. Hours later, during a meandering, hour-long press conference, the President said, “One thing they are trying to do is convince people to go against Donald Trump.” He said that the Chinese President, Xi Jinping, who was one of his earliest visitors after moving into the White House, “may not be a friend of mine anymore.”

The allegation was especially striking since the President has said almost nothing in his many public appearances in New York this week about Russia’s intervention in past or present U.S. elections. The apparent trigger for the President’s pique was rather modest. He laid into China for ads taken out—in a four-page supplement—in the Des Moines Register on Sunday. “China is actually placing propaganda ads in the Des Moines Register and other papers, made to look like news,” Trump charged on Twitter after his U.N. appearance. It was accompanied by photos of the Iowa publication’s supplement.

The practice of purchasing newspaper space—as single ads or supplements—is common among foreign governments and dates back many Administrations. It comes nowhere near the cost or sophistication of the alleged covert Russian intelligence manipulation of U.S. social media and public opinion.

Trump’s charge emerged as the rift widens between Washington and Beijing over their trade imbalance and the new tariffs imposed by the United States to try to deal with it. The budding trade war may now be entering a more serious phase, with domestic political overtones and significant diplomatic consequences—at a time when China is an ever-growing power. And Beijing may not bear all the blame for the tensions, former U.S. officials say.

“Let’s be clear: China is acting in retaliation for a trade war that the President started,” Abraham Denmark, a former senior Pentagon and U.S. intelligence official who is now director of the Wilson Center’s Asia Program, said. “China has responded to the President’s tariffs with both propaganda and by tailoring its retaliatory sanctions to exact a political cost on the President for his policies. Is China trying to influence American politics? Yes. Should we have seen it coming? Absolutely.”

Beijing has been taking out ads in the Washington Post for years, predating the Trump Administration, Denmark added. “That doesn’t make it acceptable, but there’s a distinction between influence and interference. What China did was the former, what Russia did was the latter,” he told me.

How Iowa got caught up in the diplomatic maelstrom dates back to the early rapprochement between the two countries. As a young man, the current Chinese President, Xi Jinping, made his first visit to the farm-belt state three decades ago to study its agriculture. He has kept in touch with people who worked at a corn processing plant and returned to visit the state. The current U.S. Ambassador to China, Terry Branstad, is the former governor of Iowa—and a Trump appointee. Iowa is also important to Trump’s political base.

On Wednesday, the President charged that China is now trying to sabotage his political standing among Midwestern farmers. “You have not only ads, you have statements made that they’re going to hit our farmers, who are my voters. I love the farmers,” Trump told reporters during a photo opportunity, when he met with the Japanese Prime Minister, Shinzo Abe. He said that American farmers have been hard hit by China’s artificial trade barriers, which he says he is trying to eliminate by imposing tariffs on hundreds of millions of dollars of Chinese goods.

“We’re taking in billions of dollars in tariff money going right into our treasury, and China’s getting hurt. So I don’t like it when they attack our farmers, and I don’t like it when they put out false messages,” he said. The newspaper ads, which mimic editorials, are propaganda, he alleged. “They’re made up by China, because they don’t want me to get elected because this has never happened to them.”

China shot back at the Security Council session. “We did not and will not interfere in any country’s domestic affairs. We refuse to accept any unwarranted accusations against China,” the Foreign Minister, Wang Yi, told the assembled heads of state.

The tensions may reflect fears that China will ignore the President’s demand that it reduce the trade deficit. “Trump miscalculated that he could muscle China into making concessions to his trade demands,” Ryan Hass, a former National Security Council and State Department specialist on China who is now at the Brookings Institution, told me. “He has not been able to budge Xi Jinping, who has his own domestic politics to manage. The likelihood of Trump being able to extract concessions from Xi on trade issues is declining by the day. The more the narrative hardens in Beijing that Trump seeks to derail China’s rise, and not just solve trade irritants, the less political space there is for Xi to offer any concessions on Trump’s demands.”

Meanwhile, the costs to U.S. companies are mounting—with potential political spillover for Trump’s base. “The President’s policies have already cost Ford one billion dollars in profits, and the trade deficit with China is at an all-time high,” Denmark told me. “Much of the trade deficit between China and the United States comes from America’s addiction to lots of cheap products made in China. Tariffs will raise the prices of those goods, both diminishing sales and raising the cost of living for those who buy products from China—many of whom are in the President’s political base.”

All the data points so far, Denmark said, do not point to Trump “winning on trade.” And the same can now be said of the President’s diplomacy with China.