As President Donald Trump stood before the United Nations earlier this week and threatened to “totally destroy” North Korea and its 25 million people, Russian and Chinese warships had assembled in the Sea of Okhotsk north of Japan for a major naval exercise.

The two provocative events were not unrelated. The more Trump escalates his rhetorical assault on North Korea, the more Russia and China—the world powers with the strongest ties to Pyongyang—have countered with veiled threats of their own directed at the United States and its allies.

Beijing and Moscow, possessing arguably the second- and third-most-powerful fleets in the world after the U.S. Navy, are building a metaphorical wall at sea that could contain the American armada in the event Trump drives the United States to war with North Korea. In June, two U.S. aircraft carriers —the greatest concentration of American naval might in months—sailed through the Sea of Japan near the Koreas.

The five-day Russian-Chinese war game, which includes training events on land in Russia, began on Sept. 18. The date itself apparently was no accident. It was on that day in 1931 that an explosion demolished a section of railway near the city of Mukden in China. Japan, which owned the railroad, blamed Chinese nationalists for the attack—and cited the incident when it invaded China the same day.

Today Japan is America’s closest ally in the Pacific region—and hosts key bases from which the U.S. military could stage forces striking North Korea. U.S. Marine Corps F-35 stealth fighters—America’s only foreign-based radar-evading jets—fly from Japan. The U.S. Navy stations a nuclear-powered aircraft carrier in the country. The U.S. Air Force’s facility at Kadena, on the Japanese island of Okinawa, is one of the biggest air bases in the region.

Pyongyang appreciates these facts. In a clear act of intimidation on Sept. 14, North Korea launched a ballistic missile over Japanese territory.

Three days later in response, U.S. Air Force B-1 heavy bombers, the Marine Corps F-35 stealth fighters, and Japanese air force F-2 fighters joined South Korean F-15s in a dramatic show of force, flying across the Korean Peninsula to drop live bombs on a training range. On Sept. 18, U.S. Defense Secretary Jim Mattis hinted at unspecified military options that the United States could take against North Korea.

The Russian-Chinese fleet deployed the same day as Mattis’ vaguely threatening comment. Moscow sent the destroyer Admiral Tributs, the missile corvette Sovershenny, and the rescue vessel Igor Belousov, plus two diesel-powered submarines and several support ships. China offered up the destroyer Shijiazhuang, the frigate Daqing, and the submarine-tender Changdao.

The ships practiced wartime maneuvers and fired live ammunition. Meanwhile, thousands of Chinese and Russian marines and soldier conducted mock attacks on land near Vladivostok, on Russia’s Pacific coast. An even bigger Russian land, air, and sea exercise in Belarus in Eastern Europe was scheduled to end on Sept. 20.

The Russian-Chinese exercise underscored the two countries’ determination to deter any American attack on North Korea. In July, Russian president Vladimir Putin and President Xi Jinping of China met in Moscow, where they called for world powers to seek “a proper settlement” with Pyongyang “via dialogue and negotiation.”

By contrast, Nikki Haley, the U.S. ambassador to the United Nations, on Sept. 17 told the UN Security Council that the world body had “exhausted” its options for Pyongyang’s accelerating progress toward a full-scale nuclear arsenal.

Putin has consistently warned against threatening North Korea. “Do not succumb to emotions and drive North Korea into a corner,” Putin said during an economic forum in Vladivostok on Sept. 6. “Now more than ever, everyone needs to be calm and avoid steps that lead to an escalation of tension.”

But even while he urges calm, Putin and Xi have strengthened military ties between the two countries and aligned their forces against the United States and its own Asian and European allies. In July, Chinese warships joined Russian vessels in the Black Sea for a major exercise on that body of water. The Chinese fleet had last visited the Black Sea back in 2015.

Also in July, the Russian government announced a new naval strategy primarily aimed at curtailing the “ambition of a range of states, and foremost the United States of America and its allies, to dominate the high seas.” The strategy calls for new submarines and surface vessels armed with long-range cruise missiles, both of which ship types are taking part in the war game alongside the Chinese… and sending a warning to the United States:

Keep your ships and planes away from North Korea.