Now that the Libyan sideshow is out of the way, and Syria has been placed in a holding pattern, Iran’s nuclear program is back at the top of the international agenda.

Tomorrow or Wednesday, the International Atomic Energy Agency (IAEA) is expected to release a report that, according to media leaks, will say that Iran has been conducting research in areas that could only be used for producing a bomb. The question, as ever, is what to do about it.

Here’s why military action would be a bad idea: It would delay, not halt, Iran’s nuclear program. It would in all likelihood reinforce the power of the mullahs and the Revolutionary Guards. It would unite the country behind a program that has already become a source of national pride. It would provide an opportunity for Iran’s proxies to cause havoc and hurt American interests across the Middle East and Afghanistan. It would send oil prices rocketing and propel the global economy into a nosedive in an U.S. election season. And those are only the predictable consequences in a conflict that would be fraught with unpredictable ones.

There are few good options in dealing with Iran, whose leaders have failed to change their behavior and suspend uranium enrichment in line with U.N. demands, despite harsh economic sanctions. Administration officials still hope that Iran prefers negotiations to isolation.

But if a country is bent on producing a nuclear weapon — and Iran continues to say that it is not — there are few, if any, ways to stop it. At a Senate hearing in April last year, Gen. James Cartwright was asked by Sen. Jack ReedJohn (Jack) Francis ReedOvernight Defense: Pompeo lays out new Iran terms | Pentagon hints at more aggressive posture against Iran | House, Senate move on defense bill Defense bill moves forward with lawmakers thinking about McCain Overnight Defense: Trump aide's comment mocking McCain sparks outrage | Haspel gets another 'no' vote | Pompeo floats North Korea aid for denuclearization MORE (D-R.I.) whether the only way to put an end to any potential Iranian nuclear weapon program was to “physically occupy their country and disestablish their nuclear facilities.” Cartwright, who was then vice chairman of the Joint Chiefs of Staff, replied that “absent some other unknown calculus that would go on, that’s a fair conclusion.”

Most Western experts say that although Iran is not known to have taken the decision to actively pursue a weapon — which would involve breaking out of U.N. and Nuclear Non-Proliferation Treaty constraints or accelerating clandestine work — it could be that the leadership wants to keep its options open.

So there is still time for diplomatic action before thinking the unthinkable on Iran. Israel — the only Middle East power with an (unacknowledged) nuclear arsenal — believes that the window of opportunity is closing, and it looks as though the saber-rattling from Jerusalem last week was aimed at making that point forcefully.

What we need is some kind of grand bargain with Iran, which has already a stockpile of sufficient fuel for at least four nuclear bombs if enriched to weapons grade. The world would accept Iran’s uranium enrichment program and in return the Iranians would agree to international controls to ensure its peaceful nature. The U.S. would have to convince Iran that its goal is not regime change in Tehran.

The Obama administration should meanwhile ratchet up the economic and diplomatic pressure, working through its international coalition, including Russia and China, using all the tools at its disposal short of military action.

But Obama will have to tread carefully. He must bear one thing in mind, which is that Iran brought down another American president. His name was Jimmy Carter, the last single-term Democrat.