As Napoleon is supposed to have said, don’t interfere when your adversaries are destroying themselves. The United States should remember that when dealing with China, where President Xi Jinping’s latest act of PR self-immolation was his celebration of China’s intervention in the Korean War.

“Imperialist invaders brought the flames of war burning to the doorway of the new China,” he claimed. “The victory in the war to resist U.S. aggression and aid Korea was a victory of justice, a victory of peace and a victory of the people.”

Of course, no one expects any Chinese regime, especially one populated by the nationalistic and authoritarian party cadres under Xi, to apologize for the PRC’s actions seven decades ago. Although the conflict is officially named, in inimitable Maoist fashion, “The War to Resist U.S. Aggression and Aid Korea,” Xi could simply have claimed credit for an admirable feat of warding off a potentially serious military threat American hawks, including American general and Southwest Pacific commander Douglas MacArthur, wanted to “unleash” the defeated Chiang Kai-shek and back his campaign to reconquer the mainland. In Korea, Beijing fought the U.S. to a standstill barely a year after defeating Chiang. Back in the early 2010s, there were even tentative signs of a more realistic historiography coming out of China, with historians hinting at accepting some blame for the North and films depicting the personal costs of the war.

Instead of moving in this direction, though, Xi marked the anniversary of China’s intervention by falsely blaming the West for the war. In doing so, he whitewashed the role of North. Soviet archives confirmed back in the early 1990s what already was generally known: that North Korea funder Kim Il-sung was the avid aggressor. While there is much to criticize about the behavior of ever-belligerent and irresponsible South Korean President Syngman Rhee, he was the one surprised on June 25, 1950—and would have been ousted if it weren’t for the swift American intervention, leaving the whole country trapped under the Kim family regime today.

The Chinese president compounded that offense by crediting North Korea with defending against the allied force: “After strenuous battles, the Chinese and DPRK armed forces defeated an opponent that was armed to the teeth, and broke the myth that the U.S. military is invincible.” In fact, Beijing intervened because the North Korean military had broken and was fleeing north, allowing the capture of Pyongyang and march toward the Yalu River, the border with China. Only the immediate and largescale dispatch of PRC “volunteers” prevented destruction of Kim’s regime, which had been created by the Soviet occupation authority, not the North Korean people.

In contrast, Kim downplayed Beijing’s role after the fighting ended, when he reconstituted his regime. As he consolidated power, he wiped out several opposing factions, including one friendly toward the PRC. When I visited the Victorious Fatherland Liberation War Museum in Pyongyang three years ago, I saw no mention of China’s contribution. Kim’s dedication to “Juche,” or self-reliance, left little room for crediting assistance from the DPRK’s large, potentially overbearing neighbor. A separate museum exists directed specifically at Chinese tourists, but Chinese diplomats and journalists complain in private about North Korean ingratitude.

Presumably Xi believed he was sending an important message with his speech. But to whom? Most obviously, his comments were meant for domestic consumption; in fact, he packed members of the Politburo Standing Committee off to ostentatiously visit a museum exhibit on the conflict. It seems there is never a bad time in China to inflame popular patriotic passions.

Although Xi did not mention the United States by name, it was his other unmistakable target. He warned: “The Chinese people mean that we should speak to the invaders in a language they understand.” Moreover, “Arrogance, always doing as one pleases, acts of hegemony, overbearance, or bullying will lead nowhere.” Indeed, he threatened, “Once provoked, things will get ugly … The Korean War shows that the Chinese people must not be provoked. If you make trouble, be prepared to bear the consequences.”

The clear meaning: We defeated you once and we can do so again. As John DeLury of Yonsei University observed in the New York Times, Xi is “hitting the stand-up-to-America theme pretty hard now. It’s getting intense.”

Given the cost of the so-called victory—historian Bruce Cumings believes the PRC lost as many as 900,000 men, compared to the official estimate of 200,000—this warning might not be as persuasive as Beijing hoped. Moreover, dissembling on the cause of the war will win the PRC no friends in the United States. Xi’s outburst likely will reinforce the view of those who believe that the North is but a Chinese puppet. And Xi’s hostile tone will strengthen claims that Beijing poses a military threat to Northeast Asia and America.

Xi was also likely speaking to the North Korean regime, since the Sino-North Korean Mutual Aid and Cooperation Friendship Treaty is up for renewal next year. Few believe Beijing is willing to go to war again on the DPRK’s behalf—talk of a “blood-forged alliance” and relationship “as close as lips and teeth” long ago grew stale. However, renewed celebration of their brotherhood of arms should reassure North Korea leader Kim Jong-un of at least political and economic support.

Indeed, there is talk of a Xi-Kim summit, at which Beijing might announce extension of the treaty and agree to additional economic support, while attempting to dissuade Pyongyang from taking provocative action over the winter, or to test a new American president in the spring. Kim also is currying favor, last week visiting the Chinese Martyrs’ Cemetery, and laying a wreath on the grave of Mao Anying, Mao Zedong’s son who was killed by an American airstrike. Kim’s action was well-covered in the PRC. Mutual antagonism toward Washington helped bring the two communist states, big and small, back together.

With his speech Xi also might have been laying the necessary groundwork for justifying a treaty extension to his own people. Kim has long been unpopular outside of military and party circles, denounced on social media as “Fatty Kim” and worse. One professor otherwise faithful to Beijing’s line even suggested to me that Washington should stage a preventive strike against the North. Highlighting the two nations’ past partnership against America might strengthen support for a pro-Pyongyang policy

The one country Xi probably wasn’t directly addressing was the Republic of Korea, but its government reacted sharply. Foreign Minister Kang Kyung-wha retorted: “The international debate on this has already been terminated.” The North’s culpability was “recognized by the U.N. Security Council.” Moreover, she added: “We are taking necessary communication measures with the Chinese regarding this matter.”

South Koreans are likely to interpret Xi’s remarks a simultaneous move to improve ties with the North and devalue relations with the South. Sino-suspicion already is rampant. The Pew Research Center recently found that 83 percent of South Koreans do not believe Xi would do the “right thing in world affairs.” Almost as many have a negative view of the PRC.

These numbers could worsen after hearing Xi—Chinese intervention prolonged the Korean War by more than two years, multiplied casualties and destruction, left the peninsula divided, and nearly overran the South. Especially negative are likely to be older citizens, given their personal experience with the conflict or its lengthy aftermath.

Indeed, South Korea recently rebuffed nationalistic Chinese netizens who attacked the boy band BTS for lauding wartime sacrifices made by U.S. and South Korean military personnel without mentioning PRC soldiers—who, of course, had been attempting to conquer the South. Chinese social media erupted in anger, but critics soon retreated. After a couple days, even the semi-official Global Times took down articles it had run on the controversy.

It is difficult to imagine anyone wanting to refight the Korean War. However, Beijing’s willingness to twist history about what it was defending—North Korean aggression—reinforces the dangerous trajectory of China’s relations with the United States, ROK, and other Western states. Xi may have scored domestic points, but international tensions will rise, which could further reduce the possibility of a “honeymoon” with the incoming administration and consequent opportunity for a policy reset.

No one should doubt China’s resolution under fire. But the United States proved its determination when it carried a global alliance against successive threatening powers. Both governments should avoid putting the other to the test. As Xi warned, “Once provoked, things will get ugly.” Which unfortunately is true for both sides.