In a matter of days the threats to world peace–apocalyptic nuclear threats–have grown incalculably worse, largely thanks to President Donald Trump’s failed diplomacy with North Korea and his now murderous confrontation with Iran.

Last Tuesday, North Korea’s Kim Jong Un announced that he would no longer observe a self-imposed moratorium on the testing of intercontinental ballistics missiles and the nuclear warheads in his growing arsenal. On Sunday, amid the intensifying crisis precipitated by Trump’s order to assassinate one of Iran’s top generals, Tehran announced it was effectively ending its observance of the 2015 nuclear deal that had frozen its efforts to build a bomb. (For the record, it said it never had such an intention.)

The Trump administration has vowed to use any means necessary to compel Kim to give up his nukes and prevent the ayatollahs from ever acquiring them. So the battle lines are drawn. But, making the situation even more dangerous, Iran and North Korea have a long record of lethal cooperation, including the exchange of scientific and technical secrets.

As the U.S. intensified its confrontations with both countries, they are being pushed toward even greater collaboration, and the possibility looms that the United States could find itself waging a two-front war with adversaries 4,000 miles apart.

When President Trump ordered the fiery termination of Iranian Major General Qassem Soleimani near the Baghdad airport in the small hours of Friday morning, he may have been concerned that his weird coziness with Kim and his decisions not to respond to increasingly aggressive actions by Iran had made him look weak. Blowing away Soleimani would show he is not a paper tiger. But analysts who follow North Korea and Iran closely believe that, rather than surrender to Trump’s intimidation, they are likely to step up their cooperation.

“ Iran will be counting on North Korea even more as Iran’s Supreme Leader Ali Khameini threatens ‘harsh revenge.’ ”

As it is, North Korea now has hundreds of advisers in Iran, to which it has been exporting mid-range Musudan missiles and the technology for the Taepodong intercontinental type that Kim is itching to test-fire in keeping with his promise of “a new strategic weapon” to intimidate the United States.

Bruce Bechtol, who’s been studying North Korea from his days as a Marine serving on the peninsula, then as an intelligence analyst at the Pentagon and a faculty member at the Marine Corps University in Quantico, Virginia, believes if anything the North Korea-Iran relationship is broadening and deepening.

“This has always been a robust relationship,” says Bechtol, but it’s “picked up because Iran has been supplying so many North Korean-made systems and capabilities to Syria, Hezbollah, and the Houthis–in addition to the stuff they pay the North Koreans for themselves.”

Iran will be counting on North Korea even more as Iran’s Supreme Leader Ali Khameini threatens “harsh revenge” and Iranians shout “Death to America” at funeral observances for Soleimani.

“ Will North Korea sell Iran its ‘strategic new weapon’? Why not? ” — Bruce Bechtol

“The Iranians have been at many North Korean missile launches to learn, to observe systems they might procure,” says Bechtol. “Will North Korea sell Iran its ‘strategic new weapon’? Why not? The North Koreans have sold Iran everything from light machine guns to submarines to intermediate-range ballistic missiles.”

Bruce Bennett, North Korea expert at RAND, says he’s contended “ever since President Bush described his ‘axis of evil’” in 2002 (including Saddam Hussein’s Iraq, North Korea, and Iran), the latter two have participated in a “rogue cartel,” with North Korea “very interested in the Iranian financial resources.”

Bennett says the relationship goes far deeper than is generally known, reiterating some of the points made by Bechtel. “North Korea has provided Iran with many ballistic missiles and even ballistic missile production facilities,” he says. “Iranian scientists have been at the North Korean nuclear weapon tests. And there are stories about North Korea and Iran training Syrian personnel on how to load chemical weapons on ballistic missiles. Plus, Iran seems to have submarines that look exactly like some submarines produced by North Korea.”

Bennett believes “the full details”of Iran-North Korean cooperation “probably go well beyond what we know about” but predicts, “With both North Korea and Iran seriously angry at the U.S., we could see more cooperation in the coming months.”

If and when Iran “starts taking terrorist actions against the U.S.,” he goes on, “North Korea could have an adviser role” involved in “serious provocations.”

President Trump’s order to snuff out Soleimani came three days after Kim called off his self-imposed “moratorium” on testing long-range missiles and nukes while charting a “new path” for his country, including economic reform. Menacingly, he warned of “shocking action” against the U.S. for ignoring his end-of-year deadline for resolving differences, presumably including relief from sanctions imposed after he last ordered nuclear and long-range missile tests in 2017.

“ It’s no longer possible to rule out the U.S. using ‘decapitation’ of foreign governments as an instrument of policy. ”

On the principle that “the enemy of my enemy is my friend,” says Steve Tharp, long-time military and civilian analyst of North Korea’s rise as a nuclear power, Iran and North Korea “were always working together.” Both of them would like to “focus more on cooperation to get the evil Americans.”

Beijing might yet play a restraining role, however, in view of its power and influence over North Korea, which counts on China for virtually all its oil and half its food.

North Korea’s shipments to Iran of missiles and other weaponry have gone by air over Chinese territory, but China could tamp down the flow while proposing relief in the United Nations from onerous sanctions on North Korea. “If North Korea begins carrying out serious provocations,” says Bennett, “China might pull back from sanctions relief.”

But a U.S. drone strike against an enemy general has added a sense of urgency to deliberations in Pyongyang. Trump has made it clear he is ready to dispense with any notion of “proportionality” in the violent minuets America conducts with its adversaries. That makes it difficult for them to calculate how far they can push him, but may also push them toward more extreme actions.

It’s no longer possible to rule out the U.S. using “decapitation” of foreign governments as an instrument of policy.

At the least “the Soleimani episode ought to prompt Pyongyang to re-examine its assumptions about U.S. behavior,” says Nicholas Eberstadt, long-time economist at the American Enterprise Institute in Washington. “Trump is clearly not your average president. He is clearly capable of taking actions” that previous decision-makers “would not have chosen.” Indeed, adversaries once seen as “‘untouchable' are obviously no longer so.”

If nothing else, Eberstadt believes, “the Soleimani incident might suggest the standard North Korean approach of breaking sanctions through brinkmanship might be received less well in Washington by this administration than others the Kim family regime has contended with in the past.”

“If I’m Kim Jong Un, I worry that the U.S. is willing to take out foreign leaders without waging war,” says Van Jackson, a former Pentagon official and author of On the Brink, a book about the dangers confronting the Korean peninsula. “Assassination circumvents the nuclear deterrent North Korea’s worked so hard to build. If Kim feels his deterrent doesn’t protect his ass, then he may feel greater pressure to keep his nukes on a hair trigger.”

In the meantime, “Iran will take all the help it can get to break out with a nuclear capability,” says Jackson. “The question is whether Kim will indulge Iran’s nuclear needs.”