Finding himself caught in a sudden media storm while in New York last week, Iranian President Mahmoud Ahmadinejad tried to defend his government's construction of a second centrifuge facility, buried inside a mountain near the city of Qom.

Unfortunately, the Qom facility might not be the end of the story. A centrifuge plant needs feedstock, uranium hexafluoride -- a material derived from refined uranium ore and produced at a conversion plant. Iran would probably not risk trying to divert feedstock from its declared conversion plant at Esfahan, which is under the watchful eye of the International Atomic Energy Agency (IAEA). Iran could therefore have also set up a clandestine conversion facility, or have succeeded in procuring the material illicitly.

Moreover, the evidence that the new facility is part of a military program is compelling. According to unclassified U.S. government talking points, the clandestine facility near Qom is "intended to hold approximately 3,000 centrifuges" of an unknown type. In 2007, Gholamreza Aghazadeh, then head of the Atomic Energy Organization of Iran (AEOI), said that Iran's target was to have 50,000 centrifuges at its Natanz enrichment facility. This number was needed to make "meaningful amounts of nuclear fuel" for one or two commercial-scale power plants to generate electricity.

Thus, by Iran's own admission, the Qom facility is too small for civilian purposes. It is not, however, too small to produce meaningful amounts of highly enriched uranium for a nuclear weapons program.

U.S. intelligence also describes the facility as being "located in an underground tunnel complex on the grounds of an Islamic Revolutionary Guard Corps Base" unknown to all but the most senior AEOI officials. Links between a supposedly civilian facility and a military organization always worry IAEA inspectors, and they should worry us too. Iran's core obligation to the Nuclear Non-Proliferation Treaty, which it says it fully upholds, is to ensure that all its nuclear activities are exclusively for peaceful purposes -- building an underground nuclear facility on a military base certainly raises questions about Iranian intentions. Finally, because it was a clandestine plant, the Qom facility was clearly much more suited to military ends than the facility at Natanz, which is subject to IAEA monitoring.

Although the military purpose of the Qom facility is compelling, Ahmadinejad's legal arguments are not. "According to the IAEA rules, countries must inform the agency six months ahead of the gas injection in their uranium enrichment plants," he said last week. "We have done it 18 months ahead and this should be appreciated, not condemned."

But Ahmadinejad got the IAEA rules wrong. At issue is a seemingly obscure but crucially important provision known as "Code 3.1". This is contained within Iran's "subsidiary arrangements," the detailed legal agreement with the IAEA specifying the nuts and bolts of safeguards.

In February 2003, Iran became the last state with significant nuclear activities to adopt the revised version of Code 3.1, requiring it to notify the IAEA of new nuclear facilities as soon as the decision to build one is made. This agreement entered into force through the standard procedure of an exchange of letters between Iran and the IAEA.

Ahmadinejad's claim is based on the old version of Code 3.1, which does indeed require states to report new facilities to the agency "normally no later than 180 days before the facility is scheduled to receive nuclear material for the first time." He invoked the old version because in March 2007 Iran announced that it would no longer be bound by the new version. But it takes two parties to terminate an agreement -- and the IAEA has never accepted Iran's 2007 decision. (The IAEA has continued to insist in vain that Iran reconsider its decision, making it difficult for the agency to carry out its task of designing safeguards for Iran's new nuclear facilities.)

Iran has tried to justify its unilateral abrogation of the modified Code 3.1 by saying that it has not been ratified by the Majlis, the country's parliament. However, Iran -- like every other state that deals with the IAEA -- modifies its subsidiary arrangements without parliamentary ratification. It is not tenable for Iran to claim that some parts of the subsidiary arrangements require ratification whereas others do not.

Moreover, according to the U.S. intelligence community, Iran started building its facility near Qom some time before March 2007, while it claimed to be bound to the new Code 3.1. If the IAEA verifies this sequence of events, then Iran's position will be even more indefensible than it currently is.

Tehran's decision to allow the IAEA to inspect the Qom facility, though welcome, is not enough. Iran now needs to cooperate fully and proactively with the IAEA. It needs to answer all of the IAEA's questions so that inspectors are able to understand as much as possible about the new facility, Iran's centrifuge production capabilities, and the probable military dimension to its program. Inspectors also need to be able to uncover any other clandestine facilities that might be out there.

The events of the last few days might conceivably be what's needed to spark Iranian cooperation. Iran feels able to defy the IAEA and the U.N. Security Council because the veto-wielding members of the Security Council do not have a unified position. The revelation of the Qom facility -- hidden from the international community and not declared to the IAEA as required -- demonstrates that, contrary to its protestations, Iran is not complying with its international obligations and that its nuclear program does have a military dimension. It could give Britain, France, and the United States exactly the lever they need to build a consensus that the Security Council's demands can go unheeded no longer.

Nima Gerami and James M. Acton are, respectively, research assistant and associate in the Nonproliferation Program at the Carnegie Endowment for International Peace.