Ali Asghar Soltanieh, Iran's ambassador to the International Atomic Energy Agency (IAEA), also said the Iranian government in such a case could face "tremendous pressure" to install its uranium enrichment centrifuges in "more secure" places.
His comments highlighted concerns among many Western nuclear experts that military strikes against Iran aimed at preventing it from developing weapons may be counterproductive and only drive its entire nuclear programme underground.
There has been persistent speculation that Israel might attack Iran, which it accuses of seeking a nuclear weapons capability. Iran denies the charge and says Israel's assumed nuclear arsenal is a threat to regional security.
If attacked, "there is a possibility that the (Iranian) parliament forces the government to stop the (U.N. nuclear) agency inspections or even in the worse scenario withdraw from the NPT," Soltanieh said in a statement in English to the U.N. agency's 35-nation board.
Military strikes would not stop Iran from enriching uranium, he said.
Refined uranium can have both civilian and military purposes, and a series of U.N. Security Council resolutions since 2006 have demanded that Iran suspend the activity, something the Islamic state has repeatedly ruled out.
"Iran is master of enrichment technology ... it can easily replace the damaged facilities," Soltanieh said.
But, he added in a long statement to the board, Iran is "well prepared to find a negotiated face-saving solution and a breakthrough from the existing stalemate".
A Western diplomat criticised Soltanieh's statement to the board, saying it included "absolutely ridiculous claims".
Diplomacy between Iran and six world powers - the United States, China, Russia, France, Germany, and Britain - aimed at finding a peaceful solution to the decade-old dispute has been deadlocked since a June meeting that ended without success.
Both sides now say they want to resume talks soon, after the re-election of U.S. President Barack Obama, and diplomats expect a new meeting in Istanbul in December or January.
Iran has faced a tightening of Western trade sanctions which the United States and its allies hope will force Iran to curb its nuclear programme.
Soltanieh voiced defiance: "Western sanctions have had no effect whatsoever on the enrichment activities," he said.