<i>Illustration: John Shakespeare</i>

Illustration: John Shakespeare

For years, the world has been bracing for a serious clash with Iran over its nuclear program as it worked relentlessly towards Israel's ''red line''.

Israeli Prime Minister Benjamin Netanyahu has not specified what he would do if Iran crossed his red line but we know it would not be pretty.

Similarly, President Barack Obama has said a nuclear-armed Iran would not be containable, so the US ''will do what we must to prevent Iran from obtaining a nuclear weapon''.

But last week offered the first sign of hope in seven years. Iran's new President sent his negotiators to Geneva to present a proposal for resolving one of the world's great crises.

The atmospherics have changed markedly under President Hassan Rouhani, a much more conciliatory figure than the firebrand Mahmoud Ahmadinejad.

Rouhani has startled many by dropping the regime's ritual chant of ''Death to America''. Last month he agreed to receive a phone call from Obama, the first direct contact between the leaders of the two countries since the Islamic Revolution that swept Iran in 1979. And he's said ''Iran's choice'' would be to end the confrontation over its nuclear program in an astonishingly short three months.

Iran's offer, made to the five permanent members of the UN Security Council last week, is secret, but its title is suggestive: ''Closing an unnecessary crisis, opening new horizons.'' A US State Department official said in a background briefing to reporters ''for the first time, we had very detailed technical discussions''.

What has brought this dramatic change from Tehran? The obvious explanation seems to be Rouhani himself, a moderate among the mullahs. He was Iran's nuclear negotiator at the time that it last made a concession over its program.

But the main focus of his successful presidential election campaign was his pledge to ease the international economic sanctions that are slowly strangling Iran.

The US has banned Iranian oil since the revolution, to no real effect. But the UN-authorised sanctions plus US banking pressures of the past couple of years have hurt Iran for the first time because other big customers such as the EU, Japan, China, Turkey and South Korea have joined the boycott, at least partially.

The sanctions are a direct response to Tehran's defiance over its nuclear program, which it stoutly claims is for strictly peaceful purposes. But elements of its program make no sense unless it intends to build the bomb.

In the past two years, the sanctions have halved Iran's oil exports from about 2.5 million barrels a day to 1.25 million, according to the US Congressional Research Service.

Iran's oil minister said in January it was costing the country between $US4 billion ($4.14 billion) and $US8 billion a month. This has halved government revenues and sent the economy into recession. Last year, it shrank 1.9 per cent and the International Monetary Fund forecasts a contraction of 1.3 per cent this year.

The currency has collapsed and authorities admit to inflation of 45 per cent and unemployment of 13 per cent, though independent experts estimate inflation at 50 to 70 per cent and unemployment of about 20 per cent.

Some vital imports are in short supply including Western medicines. The rich are avoiding financial institutions, which are subject to US-led sanctions, and putting their money into real estate, driving prices to new highs even as the economy falls to new lows.

The sanctions created this pain, and this pain created the political opportunity for Rouhani. The West is keen to embrace this opening. Understandably. Because the crisis presented the world with such a diabolical choice - a nuclear-armed Iran, or some sort of military action against it, possibly leading to a major regional war.

Will the negotiations succeed in defusing the crisis? We have to hope so, yet it would be imprudent for the world to act with too much enthusiasm or too much haste.

An agreement would need to guarantee that Iran's bomb-making capacity is dismantled, and verifiably so. The object lesson here is North Korea. It has strung the West along for decades, negotiating, offering, agreeing, only to then backtrack and restart. It merely bought time and now it has the bomb.

In fact, the Australian National University's Dr Leszek Buszynski writes in a new book - Negotiating with North Korea: The Six Party Talks and the Nuclear Issue - that the negotiations with the West actually helped rather than hindered North Korea's nuclear program.

''North Korea was able to exploit the different positions of the US and the Chinese in the negotiations to continue developing the bomb over six rounds of talks,'' Buszynski says.

If tough sanctions had been imposed from the beginning and kept in place ''before the situation got out of hand, they might have been more effective''.

Indeed, former US Treasury assistant secretary for financial crimes Juan Zarate says that the US had a tremendous opportunity to exert coercive pressure on North Korea when it successfully shut the rogue regime out of the world financial system in 2005.

The Kim dynasty was furious but the US ''let the North Koreans - and the Chinese - off the hook'' in return for a North Korean return to the negotiating table, Zarate writes in his book Treasury's War. ''This would be a lesson in forfeiting our financial leverage too early without guaranteed benefits.''

As Iran offers concessions, North Korea is stepping up its nuclear program: ''We are facing a new and disturbing reality as North Korea moves to develop a nuclear strike capability in the not-to-distant future,'' writes Evans Revere of the Brookings Institution in Washington.

He urges a tougher approach to compel North Korea ''to make a choice between keeping its nuclear weapons and its economic survival''.

The idea of tougher new sanctions against North Korea ''brings to mind the expression 'shutting the stable door after the horse has bolted','' Buszynski says.

The world has the opportunity with Iran that it missed with North Korea. The horse is still in the stable. It needs to be kept there.

Peter Hartcher is the international editor.