At first it was one of many suspicious sites but forensic gathering of intelligence by the west eventually forced Iran to come clean

The Qom uranium enrichment plant first appeared in 2006, in grey satellite photographs of the sort the world has become familiar with through the long years of the Iran crisis.

North-east of the mosques of Qom, the theological heart of Iran, the revolutionary guard had established an anti-aircraft missile battery at the base of the mountain, western officials said.

As intelligence analysts tried to discover what the missiles were there to protect, satellite imagery began to reveal intensive activity at the side of the mountain. "There was extensive excavation and construction work under way," a western official said, speaking on condition of anonymity.

The Qom site was put under more frequent surveillance to check on progress, but at that point it was just one site among several suspect zones being watched.

"It was like a stake-out of a building," a British official said. "You know something wrong is going on in there, but you have to wait until you've got all the evidence."

Western intelligence had been looking for a clandestine uranium enrichment site, suspecting that while the attention of the International Atomic Energy Agency was fixed on the known enrichment plant at Natanz, Iran would have a parallel programme hidden elsewhere intended to produce highly enriched uranium for weapons. Technical advances from the overt site would be continually transferred to the covert one.

Qom seemed to fit the bill. A senior US administration official described the site as "a very heavily protected, very heavily disguised facility".

The official added: "We've been aware of this facility for several years; we've been watching the construction, we've been building up a case so that we were sure that we had very strong evidence, irrefutable evidence, that the intent of this facility was as an enrichment plant."

At some point this summer, US, British and French intelligence agencies were able to corroborate the information they had, and concluded that the Qom site was an enrichment plant. "We believe that it's not yet operational. We think it's most likely at least a few months, perhaps more, from having all of the centrifuges installed and being capable of operating if the Iranians made a decision to begin operating it," the senior American official said.

It is not clear how western intelligence came to the conclusion that the Qom plant was big enough for 3,000 centrifuges.

The number is important. It is far too many for a pilot plant, which is what Iran claims it is building. That normally consists of a single "cascade" of 164 centrifuges, (and in any case there is already a pilot plant in Natanz). On the other hand, 3,000 centrifuges are not nearly enough for a civilian power programme. They can produce between one and two metric tonnes of low enriched uranium a year. That is not enough to fuel a power station, which normally requires more than 50,000 centrifuges. But 3,000 is more than enough uranium, if enriched further, to make a nuclear warhead every 12 months.

The conclusion reached by the CIA, MI6 and France's DGSE put Washington, London and Paris in a dilemma. Barack Obama had offered to extend America's hand if Iran "unclenched its fist" and the approach appeared to be giving Tehran more trouble than George Bush's bellicosity - by removing a bogeyman and paving the way for a serious challenge to the Iranian president, Mahmoud Ahmadinejad, in the June elections.

Ahmadinejad's disputed election victory represented a serious setback to the policy of engagement, but it was decided to press on with the strategy. A return to confrontation would allow the regime to portray their opponents as stooges.

Earlier this month, the Iranians finally agreed to a meeting on 1 October, and arrangements were made to meet in Geneva. "If we had come out with this, we would have been accused of torpedoing the process," a western diplomat said. In the end, the Iranians appear to have become aware that the Qom secret was out and pre-empted the inevitable disclosure by admitting it in a letter to the IAEA's director general, Mohamed ElBaradei, delivered on Monday.

The letter said Iran was building a "pilot-scale enrichment plant" designed to produce low enriched uranium, but that no uranium had so far been processed. It did not provide the location of the site, but said more information would be forthcoming at a later date.

The Iranian argument is that under IAEA safeguards, as long as no uranium hexafluoride is fed into centrifuges, the plant is not nuclear, and therefore Iran has no obligation to notify the IAEA until six months before uranium is introduced.

But western officials point out that at the time this enrichment plant appears to have been started, in 2006, Iran had an agreed obligation to notify the IAEA as soon as construction began on any new nuclear facility.

The Iranian letter to the IAEA forced the hand of the western intelligence agencies. "Once the IAEA letter had been sent, and the IAEA moved to press Iran on the plant, we had to make sure the agency had the fullest picture possible," an official said.

According to US officials, Obama told Dmitry Medvedev, the Russian president, on Wednesday, and afterwards Medvedev said "in some cases, sanctions are inevitable". On Thursday, the intelligence was delivered to the IAEA in Vienna, and US, British and French briefers made roughly the same presentation to Russian, German and Chinese officials that evening.

In the absence of significant Iranian concessions it seems clear that sanctions are on the way. The only question is how aggressive those measures will be.