IF YOU are locked eyeball to eyeball with an adversary as wily as Iran, it does not make much sense to do something that emboldens your opponent and sows defeatism among your friends. But that, it is now clear, is precisely what America's spies achieved when they said in December that, contrary to their own previous assessments, Iran stopped its secret nuclear-weapons programme in 2003.

Iran's jubilant president, Mahmoud Ahmadinejad, immediately called the American National Intelligence Estimate (NIE) a “great victory” for his country. Subsequent events suggest that he was right. Western diplomats are despondent and international efforts to get Iran to stop enriching uranium and working on plutonium have been thrown into confusion.

Already difficult diplomacy has got harder. The steadily pumped up pressure that led to two United Nations sanctions-bearing resolutions, in December 2006 and March 2007, calling on Iran to suspend the offending work, suddenly deflated. Unprecedented, if grudging, co-operation from Russia and China at the UN Security Council had been about to lead to a third, tougher resolution. But the NIE produced an abrupt softening in the positions of the Russians and Chinese. The draft America, Britain, France and Germany had to settle for when all six foreign ministers met last week in Berlin is a feebler one, designed to shore up their fraying unity rather than set Iran quaking in its boots.

In his final state-of-the-union speech this week, George Bush called on Iran to suspend uranium enrichment “so negotiations can begin”—a far cry from the fiery “axis of evil” speech he unleashed against Iran, Iraq and North Korea six years ago. This will add to Iran's belief that the NIE has made it harder for Mr Bush to brandish the military option that he has insisted remains “on the table”. The threat of force had put some steel into the six-power diplomacy. Presuming Mr Bush's guns to be now truly spiked, his critics at home are cheering along with the Iranians.

Israel, which had been counting on America to put the frighteners on Mr Ahmadinejad and his ilk, is left mulling its own dwindling options in a fissile neighbourhood. Yuval Steinitz, a former chairman of its parliament's foreign-affairs and defence committee, calls the NIE “the most bizarre and flawed intelligence report I've ever read”. For Holocaust remembrance day this week, just before Mr Bush's speech, Israel's prime minister, Ehud Olmert, sent a not very coded message to Iran and America, promising not to be complacent about “voices calling for the obliteration of Israel”, and recalling the allies' failure to destroy the Nazi death camps during the second world war.

The small print

If America's spies have concluded that Iran is out of the nuclear-weapons business, why the gloom and doom? Iran, after all, has always insisted that its nuclear programme is peaceful. Indeed, Ayatollah Ali Khamenei, its supreme leader (shown above in conversation with Mohamed ElBaradei, the director-general of the International Atomic Energy Agency or IAEA), says that building or using nuclear weapons is against Islamic law.

If only judging Iran's nuclear intentions were that simple. Contrary to the impression left by the NIE's published conclusions (the bulk of its analysis remains classified), a nuclear-weapons programme has three main elements: the design work and engineering to produce a workable weapon; the production of sufficient quantities of fissile material—very highly enriched uranium or plutonium—for its explosive core; and work on missiles or some other means of delivery. Although the NIE talks of a halt to Iran's “weapons programme”, its conclusions relate only to the design and engineering effort and past hidden uranium experiments . But the weaponisation work the NIE thinks was halted is easy to restart and easy to hide.

Hence the fury of even some of America' s closest European allies at the NIE's selective and then mangled message. Iran boasts of its skill in building ever farther-flying (and potentially nuclear-capable) missiles. And by far the hardest skill in bomb-making is the one Iran now pursues in plain sight, in defiance of those UN resolutions: producing uranium or plutonium. Israel claims to have evidence that the warhead work continues too—but this fails to pass muster in Washington under rules designed to avoid another debacle like that over the missing weapons of mass destruction in Iraq. Britain's intelligence analysts, studying the same information as America's, have not yet decided whether the American conclusion is right.

The damage done by what the NIE did and did not say cannot easily be undone. To some, the report changes little; if anything Iran has an even harder case to answer, because the weapons programme the NIE says Iran was working on until 2003 is a breach of Iran's anti-nuclear promises under the Nuclear Non-Proliferation Treaty. Meanwhile, it is Iran's open nuclear work that is the target of UN sanctions. Yet it might be truer to say that the NIE changes both nothing and everything—and in all the wrong ways.

Unchanged is the suspicion hanging over Iran's nuclear intentions. Mr Ahmadinejad has never been able to explain convincingly why Iran is the first country to have built a uranium-enrichment plant without having a single civilian nuclear-power reactor that could burn its output (the ones Russia has all but completed at Bushehr will operate only on Russian-made fuel). He says he wants to build lots more power plants. But learning to enrich uranium—a hugely costly venture—still makes questionable economic sense for Iran, since it lacks sufficient natural uranium to keep them going and would have to import the stuff. And although the 3,000 fast-spinning centrifuge machines it has up and running at Natanz are enriching only to the low levels used in civilian reactors, running the material through a few more times, or reconfiguring the centrifuge cascades, could soon produce uranium of weapons grade.

Some other countries—Iran likes to point to Japan—have civilian uranium and plutonium-making technology and no one creates a fuss. What they don't have, however, is Iran's murky nuclear past. It took a tip-off from an Iranian opposition group to alert IAEA inspectors to the construction of a secret uranium-enrichment plant at Natanz and a heavy-water reactor that produces plutonium at Arak. Since 2003, the IAEA has found multiple other breaches of Iran's nuclear safeguards.

Caught radioactive-handed, Iran could have chosen to come clean. Instead it stonewalled, refusing to answer questions about some of its alleged activities, including those that the NIE is confident were clear evidence of weapons intent. Under intense scrutiny, and fearful that it could be next on Mr Bush's target list after Afghanistan and Iraq, in 2003 Iran called a temporary halt at Natanz and put out feelers to America for talks. But America ignored those approaches, and since 2006 Iran has resumed uranium enrichment. If its intentions were peaceful as claimed, this behaviour is “incomprehensible”, says Pierre Goldschmidt, a former deputy head of the IAEA.

Mr ElBaradei, the head of the IAEA, seems less certain of this. Fortified by a Nobel peace prize, he has been working assiduously to prevent a military confrontation between Iran and America. This outspoken effort to confound what he has called the “crazies” in Washington has angered Western diplomats. They complain that he has tripped up diplomacy (he suggested that Iran be allowed to keep some enrichment work going, even though the Security Council and the IAEA itself had demanded a halt) and cares more about getting Iran “out of the doghouse” than doing his job by holding it fully to account.

Iran itself certainly appears to see the IAEA as the way out of its remaining difficulties rather than a thorn in its side. On a charm offensive at the World Economic Forum in Davos on January 26th, its foreign minister, Manouchehr Mottaki, told world leaders that it made no sense for the Security Council to consider new sanctions at a time when American spies had confirmed that Iran was not building a bomb and Iran was on the verge of completing the “work plan” it signed with the IAEA last August.

Under that plan Iran promised to answer the agency's outstanding questions by last December. Now it says it will divulge all by mid-February. The Iranians have already come up with some more answers about past illicit plutonium experiments. They have shown that some of the unexplained traces of enriched uranium came from contaminated imports supplied by the black-market operation run by the now disgraced head of one of Pakistan's nuclear laboratories, Abdul Qadeer Khan. (Iran says it bought kit from Mr Khan because nobody else would supply needed “civil” equipment.) And they have told inspectors more about the faster-spinning centrifuge machines supplied by the Khan network that Mr Ahmadinejad had already boasted were undergoing tests.

But inspectors have more questions. They are still probing, among other things, alleged activities that the NIE report is confident show clear weapons intent: design work on a potential warhead and a test shaft, and high-explosive testing to develop triggers for nuclear bombs. Come mid-February, Mr ElBaradei and his inspectors may have got no more than another Persian raspberry on some of this. They will report to the IAEA's 35-nation board in March.

In any case, accounting for Iran's past does not lessen the danger of its accumulation of enriched uranium for the future. A stock of low-enriched uranium could give it a break-out capacity to build a weapon in a matter of a few months, depending on how far Iran had got with its earlier weaponisation work. Thanks to Natanz, Iran could have enough highly-enriched uranium for a bomb by 2009, says the NIE report, though more probably by 2010-15. So being more truthful about the past would not get Iran entirely off the hook.

Conditional offers

But might it open a path to negotiations with America? In a change of policy last year, Condoleezza Rice, America's secretary of state, said she would be willing to talk directly to Iran about all their differences (they are already talking on and off about Iraq) once it had suspended uranium enrichment. The Americans and Europeans, supported by Russia and China, promised that a halt to enrichment would win Iran improved political and economic ties, talks on regional security and help with advanced, but less suspect, nuclear technology. Russia even offered to enrich uranium on Iran's behalf, to get talks going. Many of America's presidential candidates have added to the mood music by picking up ideas for a “grand bargain” with Iran across a range of issues.

Yet it is far from clear that Iran is interested in a deal with America, especially while Mr Bush remains president. Ayatollah Khamenei recently allowed that the bar on talks with America might not last for ever. But, for the moment, “Not having relations with America is one of our main policies”, he said. In the meantime, Iran continues to deride the actions of the Security Council as “illegal”. Its atomic energy chief says he expects a clean bill of health from the IAEA in March, and at that point “Iran's nuclear case will be closed.”

Mr Khamenei and Mr Ahmadinejad have long counted on the hesitation of sanctions-shy Russia and China, and the support of friends in the non-aligned movement, to give Iran sufficient cover to enrich on regardless. America, Mr Khamenei reportedly told Mr ElBaradei, “will not be able to bring the Iranian nation to its knees by raising this or other issues”. Mr Bush, to be fair, has stressed that he has no intention of depriving Iran of the properly peaceful benefits of nuclear power—to the point of supporting Russia over the start of its fuel supplies for Bushehr.

One reason for Iran's defiance is that Mr Bush is looking increasingly weak. On his tour of the Middle East last month, the president talked up the Iranian threat and America's determination to deal with it diplomatically. But his public efforts to rally Arab governments to confront Iran fell flat. Damagingly, the NIE is being read in the Gulf as a signal that Mr Bush is no longer serious about facing down Iran.

An uneasy home front

As Iran approaches parliamentary elections in March, the regime's bigger headaches may be on the home front. Officialdom can brush off protests, such as a petition from several hundred activists, journalists and academics calling for a uranium freeze, and a letter from more than 500 women criticising some in the regime for playing into America's hands with their defiance and risking war.

Mr Ahmadinejad may claim the NIE as a victory. But before its publication and since, he has been under attack from fellow conservatives for the parlous state of Iran's economy. Even Mr Khamenei has chipped in with mild criticism, and recently overrode the president to order increased spending on gas supplies for Iran's remoter regions that have been suffering shortages in a bitterly cold winter.

EPA

Ahmadinejad is less than loved

Oil may be hovering around $90-100 a barrel, but Mr Ahmadinejad has squandered much of the windfall on wasteful subsidies. In a country where two-thirds are under 30, unemployment is rising fast. Inflation now runs at an official 19%, according to central-bank figures, compared with 12% in 2006, and may well be higher.

Iran's international isolation adds to the distress. The UN'S sanctions have been closely targeted on companies and individuals involved in nuclear and missile work, but American-inspired financial sanctions bite harder. Most European and Japanese banks, with too much to lose to fall foul of America's sanctions laws, have backed away from business in or with Iran, especially in dollars, but in other currencies too. In recent months some banks in the United Arab Emirates and Bahrain—where Iran has transferred a lot of its business—have reportedly followed suit. Trade continues, but governments have pruned export credits. Although India has hitherto been one of Iran's main suppliers of refined gasoline and diesel, the difficulty in getting letters of credit recently forced Iran to find supplies through Singapore. China has picked up contracts to exploit Iran's oil and gas fields where European and Japanese companies have hesitated, but Iran needs Western technology to prevent energy production slipping further.

Disgruntlement at the cost of economic isolation grows. The hope behind Western strategy has been that ordinary Iranians who take pride in their country's nuclear prowess will come to question the price they are being asked to pay for persisting with expensive technologies that other nuclear-powered countries have done without. All the more so, since their government denies any weapons intent.

The trouble is that Mr Ahmadinejad's conservative critics within the regime and in parliament tend to be hardliners over Iran's nuclear “rights”. The president's men may fare badly in the March elections. Mr Ahmadinejad could be turfed out of office in presidential elections next year. But it is the supreme leader who makes nuclear policy, and this may not change. Having persisted with enrichment in defiance of sanctions, why should Iran alter course just when the combined efforts of America's spies and the IAEA look likely to bring about a reduction of pressure and an escape from isolation? Hedging their bets, American allies such as Egypt and the Gulf Arabs have lately been showing a friendlier face to Iran.

In theory, one possibility Iran still needs to worry about is a pre-emptive attack by Israel. Israel has no doubt that Iran is bent on getting the capability for a bomb, something that Mr Olmert says Israel will “not tolerate”. Content to pipe down while pressure on Iran was building, Israel has nonetheless deliberately narrowed the ambiguity over its own nuclear arsenal, once a taboo subject in public. A missile Israel recently tested was able to carry an “unconventional” payload, said Israel Radio. Israel has also just launched a sophisticated spy satellite, making no secret of the fact that its target is Iran.

What Israel may or may not do

Israel says that even if America's spies are right (and it does not think they are) about Iran having given up its efforts to build a nuclear warhead in 2003, Iran's enrichment activities at Natanz are a clear and present danger. But whether Israel would dare to go it alone in an attack on Iran is uncertain. Doing so without American approval or help would be fraught with danger, and the NIE has made it very much harder for Israel to justify such an attack in the court of public opinion.

What if neither sanctions nor force stops the centrifuges? Once Iran produces sufficient nuclear material, it could eventually get to not much more than a screwdriver's turn from a bomb—as Pakistan showed before it decided to echo India's nuclear tests in 1998. In 1981 Israeli airstrikes crippled an uncompleted Iraqi nuclear reactor to nip Saddam Hussein's nuclear ambitions in the bud (Iran, just as concerned at Iraq's intentions, had earlier struck the reactor with missiles). The attack may have delayed Iraq's nuclear programme, but also drove it underground. After the first Gulf war ten years later, astonished weapons inspectors found Iraq had been working secretly on three different ways to a bomb.

Paradoxically, America's NIE raises the alarm about just this sort of eventuality. The 16 intelligence services that signed the report concluded that Iran has the scientific and industrial capacity to build a nuclear weapon if it chooses, and that “at a minimum” it is keeping the option to do so open. But, whether by accident or design, the report was written in a way that allowed the finding about weaponisation to suck attention away from the uranium work, which diplomats had spent years trying to stop by means of painstaking diplomacy. Iran may not yet be home free, but the international campaign to stop it getting the bomb that many countries think it wants is on the point of failure.