President Trump is reeling from his mismanagement of the covid-19 epidemic, the crashing economy and nationwide protests for racial justice. His poll numbers are sinking fast. Add one more stressor — say, a foreign policy crisis that further demonstrates his incompetence — and his chances for reelection in November might be crushed once and for all.

That’s not just what some partisans of Joe Biden might be thinking. It’s likely very much on the minds of a couple of U.S. adversaries with an interest in deposing Trump — and the means to bring about the requisite emergency. Three years of Trump’s “maximum pressure” campaigns have given Iran and North Korea motive to deliver a nasty October surprise — and the abject failure of U.S. policy has given them the opportunity.

The most likely source of such intervention is the regime of Ayatollah Ali Khamenei, whose deep antipathy toward the United States has been compounded by hatred for Trump. Without offering a coherent rationale, Trump first shredded the nuclear accord with Iran and then launched what has become a relentless escalation of economic sanctions — which continued even as Iran was hammered by the pandemic.

There is remarkable agreement across the spectrum of Iran experts on what this campaign has achieved: not much. “‘Maximum pressure’ has caused unprecedented economic pain for the Iranian regime, but has not yet resulted in any outcome that advances American interests,” concluded an analysis by Michael Singh, who was senior director for Middle East affairs at the National Security Council during the George W. Bush administration. “It has not resulted in a new U.S.-Iran negotiation, ended or meaningfully obstructed Iranian regional activities, or provoked political instability in Iran.” Recent prisoner exchanges haven’t altered the larger confrontation.

What it has done is given Khamenei good reason to try delivering Trump to the same fate suffered by Jimmy Carter, who became a one-term president after failing to free U.S. hostages held by Iran. Reuel Marc Gerecht, an Iranian expert at the conservative Foundation for Defense of Democracies, judged in a recent essay that “it’s a near certainty that the supreme leader is going to attack something more significant than what he has before November.” A bold Iranian venture to deliver gasoline to Venezuela last month was an indication of Tehran’s belligerent mood.

The U.S. strike in January Trump ordered that killed Khamenei’s military right hand, Qasem Soleimani, was meant to deter such mischief. But the ayatollah was evidently unfazed. Since then, Iranian-backed groups have attacked U.S. forces in Iraq more than 20 times. Trump, wishing to avoid a military escalation in the Middle East that might alienate his base, has not responded other than by continuing to apply sanctions. That gives Khamenei motive to launch a larger provocation that would either force Trump to respond or look impotent. Either way, the electoral impact on the incumbent president likely would be negative.

Of course, Khamenei may decide that an offensive initiative is too risky, or that Trump is likely to lose without any help from him. Yet the point is that three years of “maximum pressure” have left Tehran with nothing to lose; Trump can only hope that the regime chooses to quietly endure the sanctions for the next five months.

He will also have to hope for similar restraint from Kim Jong Un, the North Korean despot with whom he once famously claimed to have fallen “in love.” Trump’s “maximum pressure” tactics succeeded in arresting what had been a regular regimen of North Korean nuclear and long-range missile tests in 2017. But Trump’s ham-handed attempts to negotiate a nuclear deal with Kim flopped, in large part because the president vastly overestimated his ability to win the dictator over at one-on-one summits.

Since the last of those meetings 15 months ago, U.S.-North Korean diplomacy has collapsed, and Trump behaves as if he has forgotten all about it. But Kim, still struggling to manage an economy under heavy U.S. sanctions, has warned repeatedly that he will return to testing nuclear weapons or the means to deliver them to the United States. On May 24, he appeared at a meeting of the ruling party to announce “new policies for further increasing the nuclear war deterrence of the country and putting the strategic armed forces on a high alert operation,” according to the state news agency.

Maybe Kim was bluffing. Or maybe he, too, is contemplating a pre-election provocation. North Korea is well known for timing nuclear and missile tests around U.S. elections; in 2016, the regime conducted a major nuclear test in September and multiple missile tests in October. Back then, Trump said they were proof of a “massive failure” by the Obama administration and Hillary Clinton. Now Kim has the opportunity to hand that line to Joe Biden. Trump’s failed policy has left Kim, like Khamenei, with little to lose.

Read more: