Of 197 MPs present, 183 voted in favour of the bill.
The session was broadcast live on state-run radio, four days in advance of an International Atomic Energy Agency (IAEA) board meeting to consider referring Teheran to the council for possible sanctions.
When the bill becomes law, as is expected, it will strengthen the government's hand in resisting international pressure to abandon uranium enrichment, a process that can be used to produce fuel for nuclear reactors or an atomic bomb.
The US charges that Iran is trying to build a nuclear weapon, but Iran says its program is for generating electricity.
"If Iran's nuclear file is referred or reported to the UN security council, the government will be required to cancel all voluntary measures it has taken and implement all scientific, research and executive programs to enable the rights of the nation under the Nuclear Nonproliferation Treaty," MP Kazem Jalali quoted the bill as saying.
Cancelling voluntary measures means Iran will stop allowing intrusive inspections of its nuclear facilities by the International Atomic Energy Agency and would resume uranium enrichment.
Retaliation
Top Iranian officials, who maintain the nuclear drive is for strictly peaceful purposes only, have already warned of retaliation if Iran is referred to the Security Council.
The text of the statement does not refer to specific forms of retaliation, but counter-measures could encompass a refusal to adhere to the additional protocol of the nuclear Non-Proliferation Treaty, which gives increased inspection powers to the International Atomic Energy Agency.
The protocol, signed by the previous reformist government but not ratified by deputies, is seen as being crucial to an IAEA probe into allegations that Iran is using an atomic energy drive as a cover for weapons development.
The threat of retaliation could also include an end to Iran's freeze of ultra-sensitive uranium enrichment -- a process used to make reactor fuel but which can also make the explosive core of a nuclear weapon.
Foreign ministry spokesman Hamid Reza Asefi said the IAEA would not be let into a suspect military site in Tehran unless it provides "concrete proof" to justify an inspection.
He also insisted a new report by IAEA chief Mohamed ElBaradei does "not contain any negative points", even if the text explicitly states that "Iran's full transparency is indispensable and overdue."
IAEA demands
One of the IAEA's demands is to return to the Lavizan-Shian area in Tehran, site of a physics research center that was dismantled and the ground razed before IAEA inspectors paid an initial visit in June 2004.
Under the NPT, Iran is not obliged to provide access to such sites but has allowed some access as a "confidence-building" measure.
"They cannot just say we want to talk to this or that person and keep on dragging out the dossier," Mr Asefi argued.
The agency has uncovered suspect activity in Iran yet no "smoking gun", but concerns have been raised by Tehran's submission of a document bought on the black market describing how to make what could be the explosive core of an atom bomb.
Mr Asefi said the significance of the document was being exaggerated, saying "there is no legal and rational reason to send Iran's case to the Security Council."
The IAEA report, he said, "clearly shows Iran has cooperated."
Iran triggered the latest crisis in August when it effectively broke off
negotiations with Britain, France and Germany on a package of incentives for restraining its nuclear plans and resumed uranium conversion activities it had suspended a year ago.
Conversion is a precursor to enrichment, and the IAEA board has twice called on Iran to return to a full freeze. Iran says it is willing to
negotiate, but not suspend all of its activities.
An IAEA resolution passed on September 24 also stated that Tehran was in "non-compliance" with the NPT -- an automatic trigger for taking the matter to the Security Council.
Iran also announced it will stop conversion work for 15 days but added the halt was only for brief maintenance work and not a result of international pressure and the IAEA board meeting.
