HONG KONG—“I am,” said Moon Jae-in on Thursday, “in complete sympathy with President Trump’s diplomacy of strong power.”

Strong power indeed. So strong that Moon, the newly elected South Korean president who disagrees with Trump on most everything, unexpectedly fell into line with the American leader.

The Thursday and Friday meetings between Trump and Moon cap one of the most consequential—and successful—weeks for U.S. foreign policy in recent memory. All it took was four days for Trump to discard two—and maybe four—decades of Washington’s settled China policy. By doing so, it looks like he saved his country’s six-decade-old alliance with South Korea, which was in danger of coming under China’s—and North Korea’s—sway.

And by preserving unity with Seoul, Trump, at least for the moment, narrowed the options of North Korean supremo Kim Jong Un, limiting the possibility of his nuclear adventurism.

The momentous week began with the visit of Indian Prime Minister Narendra Modi to the White House, marked by three bear hugs between the pair and the warmest of welcomes. Washington observers had been concerned that current trade and immigration irritants would derail the approach set by the Bush and Obama administrations to fortify links between the world’s most populous democracy and its most powerful one, but Trump kept ties on track. “The relationship between India and the United States has never been stronger, has never been better,” the American leader said, accurately characterizing matters.

The word “China” did not pass the lips of either the American president or the Indian prime minister in their post-meeting remarks Monday, but it was clear both saw in the other the means to contain an increasingly aggressive Chinese state.

Doubts about the significance of Monday’s meeting were dispelled the following three days. Tuesday, the State Department dropped China to the worst ranking—Tier 3—in its annual Trafficking in Persons report after not giving the country another waiver. Among other things, State cited China’s use of forced labor from North Korea.

And then came two blasts Thursday. First, the Treasury Department designated Bank of Dandong, a Chinese bank, a “primary money laundering concern” pursuant to the Patriot Act. The U.S. charged that the bank has been handling, in violation of American law, money for North Korea’s ballistic missile and weapons of mass destruction programs.

This was not the first time Treasury severed a Chinese financial institution from the global financial system—it cut off Bank of Kunlun in July 2012 for evading Iran-related rules—but it was, as sanctions expert Joshua Stanton told The Daily Beast, “an important first step, one that will send a clear message to the Chinese banks that have long laundered North Korea’s money and aided its proliferation.”

Moreover, Treasury on Thursday sanctioned a Chinese company, Dalian Global Unity Shipping Co., and two Chinese individuals, freezing their assets and prohibiting U.S. persons from dealing with them.

Second, the Trump administration on Thursday notified Congress of a proposed $1.42 billion sale of arms to Taiwan, the self-governing island Beijing’s claims as its 34th province. The White House, not wanting to upset Chinese officials, had sat on the package, which the Obama administration had prepared in its final months.

Beijing was “outraged” over the arms sale and angered over the Patriot Act designation, but the administration, according to various reports, did not care. As one observer told the Washington insider Nelson Report at the end of last week, “word on the street” is that the White House “has called this ‘F--- China Month.’ ”

The new attitude toward China is bound to last more than a month as the president has, in the course of four days, clearly thrown out two decades of American policy that had placed a higher priority on integrating China into the international system than disarming North Korea. Moreover, it looks like he has also started a dynamic that will lead to the reversal of four decades of attempts to place the promotion of friendly relations with Beijing over the stout defense of immediate American interests.

Yet whether Trump abandoned four or just two decades of China policy last week, he most certainly rescued the 63-year-old mutual defense treaty with the Republic of Korea. There was great concern that President Moon, a leftist, was going to walk away from the U.S. during his meetings with Trump.

The South Korean had spent the first days of his presidency trying to reorient Seoul away from Washington and toward the other Korea. Moreover, Moon and his aides have been saying things inconsistent with the maintenance of the alliance, and many in the Seoul and Washington policy circles were concerned he was heading to the American capital to have it out with Trump.

After all, his policy toward the Democratic People’s Republic of Korea was inconsistent with that of the American administration. While Trump is seeking to deny the Kim regime of the resources to build nukes and missiles, Moon wants to win Pyongyang’s trust by providing essentially unconditional aid and assistance and resuming investment.

Moon did not have a road-to-Damascus conversion while in Washington last week—his “progressive” views on North Korea have been baked-in for decades—but he appears to have been impressed by Trump’s determination, hence his surprising comment on the American “diplomacy of strong power” and his unexpected criticism of prior U.S. presidents for not acting resolutely.

No recent U.S. president has appeared willing to oppose the Chinese, so leaders in Asia have generally decided to “bandwagon” with Beijing. Trump showed last week he was not particularly fearful of crossing China.

So it looks like Trump’s moves against China last week, immediately preceding Moon’s two days of meetings with the American leader, convinced the South Korean that it was not in his interest to stand in opposition to the current occupant of the White House. In short, Trump, by acting decisively against Beijing, boxed in Moon.

The preservation of U.S.-South Korean unity should have two good effects. First, it should take some of the heat off Seoul, which has been the subject of unrelenting pressure from Beijing. Chinese leaders for months have been upset that Moon’s predecessor, Park Geun-hye, agreed to the deployment of Lockheed Martin’s Terminal High Altitude Area Defense system on South Korean soil.

Chinese leaders, as a result, imposed unofficial sanctions on the South’s economy to get rid of THAAD, as the missile-defense system is called, and Beijing in recent weeks evidently thought that a rift between Moon and Trump presented a new opportunity to bully the South Korean political establishment.

Second, Kim Jong Un this week surely sees less of an opening to exploit differences between the two historic allies. And this means, as a practical matter, that he will be far more cautious with moves to destabilize his neighbor to the south and the broader region. The Kim family has always tried to drive wedges between Seoul and Washington, and Pyongyang has been restrained when it has viewed the alliance as strong.

For now, the alliance does look strong, and that is no small achievement for President Donald John Trump.

The impulsive Trump is fully capable of undoing his great week in Korean diplomacy, but if he stays the course he will reorient American foreign policy in ways history will remember—and perhaps he will create lasting peace on the long-troubled peninsula.