"Today the IAEA (International Atomic Energy Agency) holds every detail on Iran's nuclear programme," Rear Admiral Ali Shamkhani was quoted as saying.
"If there is a military attack, that would mean that the IAEA has been collecting this information to prepare for an attack. Naturally, after such an action, it would be necessary to renounce all of our nuclear commitments."
The IAEA is investigating Iran's ambitious bid to generate atomic energy, but has been critical of the regime's level of cooperation. The United States and Israel accuse Iran of seeking nuclear weapons.
Shamkhani warned them of a fierce retaliation if they decided to attack.
"The United States and the other enemies of the Islamic republic must know that we will respond to a military action against our country with all our force," he said, adding the retaliation would be "unlimited by time and space".
Although alluding to a possible threat of US or Israeli missile strikes against Iran, the minister said he did not fear a full-scale invasion.
Before trying to take over Iran, Shamkhani said Washington would have to wait the same amount of years that separated the end of the Vietnam war and the invasion of Iraq -- virtually three decades -- given its current woes in Iraq.
Iran's nuclear programme was on the agenda in Washington Tuesday during talks between US Secretary of State Colin Powell and Israeli Foreign Minister Silvan Shalom.
"Iran is the country that has announced that one missile toward Israel will destroy the Jewish state. So we should be concerned about the Iranians' efforts to develop nuclear weapon," Shalom said.
He also charged that Iran, regarded as the Jewish state's number one enemy, was trying to develop "a new missile that will include Berlin, London and Paris, and the southern part of Russia in its range."
Powell, speaking alongside Shalom, said the administration of US President George W. Bush had been pointing out Iran's nuclear weapon capability to the international community for the past three and a half years.
"The United States will continue to press in every way that we can, use all of the diplomatic and other resources at our disposal, to make sure the international community stands unified behind the effort to stop Iran from pursuing nuclear weapons development, or worse, acquiring a nuclear weapon," Powell said.
In response, Iran's foreign ministry spokesman Hamid Reza Asefi said Powell's comment's show the US "has no independent policy on Iran's nuclear programme and follows the Zionist regime."
He said Powell was trying to cover up Washington's "shame" of supporting Israel, while Shalom was "covering up the dangerous character of Israel's nuclear programme."