Riyadh, Saudi Arabia CNN  — 

Iran may well have calculated that it’s better off with a Democrat in the White House and not a Republican like President Donald Trump.

Logically – and Iran’s leaders are intensely pragmatic in that far-sighted way – Tehran will likely calibrate its vowed “harsh revenge” response to the killing of Qasem Soleimani in a bid to cost Trump re-election.

Part of that calculation is likely to have Iran focus on targets inside the United States as well as in the Middle East, not just to embarrass Trump but to limit regional escalation.

Hours after the strike Trump said his intention was “to stop a war. We did not take action to start a war.” But the President’s actions may soon catch up with his words at home – especially when fighting an election campaign.

And the President should be aware that while Iran may well start to settle the score quickly, it is also a master of serving revenge up cold.

During a bout of Middle East tension in 1988, the USS Vincennes on patrol in the Persian Gulf accidentally shot down an Iranian civilian passenger jet, killing all 290 people on board.

Tehran’s leaders waited nine months for revenge, widely suspected of having a pipe bomb detonated under the Vincennes captain’s car, narrowly missing maiming his wife.

The advantage of attacking inside the US limits the likelihood of its regional neighbors escalating hostilities, and that’s important for two reasons. One, Iran is likely to lose in a regional conflict and, two, the optics are better; revenge is directly aimed at the culprit of the attack, limiting tempers flaring in the region.

For sure the world has moved on a lot since 1988, and post-9/11 the US is far more attuned to catching international terrorists on its soil, but the idea for Iran will likely remain the same. Pick a soft and symbolic target that might embarrass the US President; a cyber-attack can now cause as much disruption as a pipe bomb, for example.

Key players with much to lose

Other stakeholders with sway in Tehran, like Russia and China, who last week held joint naval exercises in the Persian Gulf may also be ready to tolerate an Iranian response that helps remove Trump from the White House in 2020.

Russian President Vladimir Putin might value Trump for his naivety and inexperience, but not his unpredictability, particularly where Russian interests can be negatively impacted like the Middle East. A big regional war would be inevitably costly for Russia; they simply couldn’t walk away from the blood and toil they’ve spent in Syria. The calculation for Moscow would be, why risk war as a result of an unpredictable Trump in office if you can maintain and grow regional influence without undue economic pain?

China also is familiar with the economic pain and uncertainty inflicted by Trump: China and Russia – both core allies of Iran – both have much to lose if Tehran’s revenge backfires, and potentially much to gain if the theocratic leadership can unseat Trump.

Over the past few months Trump has oscillated from planning to pull forces from the region, to sendingthousands more in. But this swing between, on the one hand, disengagement and, on the other, potentially triggering a war is an unsustainable uncertainty for both China and Russia. At a minimum they may well be ambivalent to Trump’s exit from the White House and not stand in Iran’s way.

Russia in particular has much to gain from letting Iran take revenge as it sees fit. Putin is friends of the leaders in both Tehran and Riyadh. In any regional escalation Moscow could emerge as mediators, or at the very least have scope to exploit its role as middleman to America’s disadvantage.

Although Trump is unlikely to lose many votes over such subtle shifts of global power, it will still be grist to the mill for Democrats grinding down narrow margins next fall. So too will voter perceptions of what is happening in the Middle East be in play even if war is avoided, as still seems most likely thus far.

To that point, the killing of Soleimani may still be playing out. He was vital in bringing Russia into Syria, making trips to Moscow in 2015 and 2017. He was also vital in handling Syrian President Bashar al-Assad, as well as an extensive network of Shia militias in Syria, and proxies elsewhere in the region. If his replacement hasn’t nailed those powerful relationships, all bets for stability could still be off.

The situation is fragile and the chance of it backfiring on US long term interests is significant.

Strategically, Trump seems disadvantaged, with an election on his plate and an enemy poised, waiting with a cold course of revenge on hand.