Foreign leaders don’t cast a vote in American elections. But they do have the opportunity to influence the outcome.

In the case of the showdown over Iran’s nuclear program, both Iran and Israel are closely watching the U.S. election. Their actions in the coming months and their calculations about President Obama’s reelection chances will undoubtedly help determine the outcome.

Here’s the way I look at it. The Obama administration wants quiet on the foreign-policy front before Nov. 6. Two wars are being wound down and the administration is averse to a third with particularly unpredictable consequences. So from there to believing that Obama’s reelection chances could be scuttled by Israeli strikes against Iran is just a short step. Cue visit by the national security adviser, Tom Donilon, to plead with Israeli Prime Minister Benjamin Netanyahu against acting any time soon.

U.S. intelligence leaders said on Capitol Hill last week that the Israeli government has not yet decided whether to carry out military strikes on Iran. I believe that the Israeli calculation will have as much to do with the U.S. presidential election as to the much-discussed window of opportunity based on Iran’s uranium enrichment program. And that political determination has not yet been made by Israel, even though Netanyahu has hardly bothered to conceal his preference for anyone-but-Obama.

Now let’s take Iran. With the conflicting signals emanating from a divided leadership in Tehran it’s difficult to read the Iranian game plan. But it’s clear that at least part of the leadership wants to engage with the West on striking a deal over the nuclear program. That’s what produced last week’s letter to the P5 + 1 (the U.N. Security Council permanent members plus Germany) offering the first direct talks in more than a year. But it remains to be seen whether the gesture represents anything more than another attempt by the Iranians to play for time.

Iran may be calculating that it would stand a better chance of striking a deal with Obama than with any of the Republican candidates, who have expressed more enthusiasm for a military option.

So that’s how both Iran and Israel will have a say in the November election. They might not actually cast a vote, but we need to be aware of their power to influence the politics of an election year.