Iran's supreme leader has warned his country could pursue nuclear activities outside international law if illegal action is taken against it.
Khamenei sounded a defiant tone as the UN prepared to meet
Ayatollah Ali Khamenei's comments came as the UN Security Council prepared to discuss further sanctions against Iran to try to halt its nuclear programme.
Tehran has already rejected as illegitimate an earlier UN resolution imposing sanctions against it.
It denies Western claims that it is seeking to produce nuclear weapons.
It says its nuclear programme is purely for peaceful purposes.
A draft resolution containing additional sanctions was agreed last week by ambassadors of the council's five permanent members.
In a nationally televised speech, Ayatollah Khamenei said Iran was determined to pursue its nuclear programme, regardless of international action.
"Until today, what we have done is in accordance with international regulations," he was quoted by the Associated Press news agency as saying.
"But if they take illegal actions, we too can take illegal actions and will do so."
Ayatollah Khamenei did not elaborate on what he meant.
Last December, the Security Council voted unanimously to impose a first, limited set of sanctions against Iran for refusing to halt uranium enrichment.
The latest package includes extending a freeze of assets to those linked to Iran's nuclear and missile programmes and a ban on new grants and loans to the state.
The draft gives Iran 60 days to comply with UN demands or face "further appropriate measures".
Ayatollah Khamenei also warned that Iran would use all its resources to respond to threats and the use of force by its enemies.
The BBC's Frances Harrison in Tehran says that given the fact that his speech marked the new Persian year and was for an internal audience, it is interesting that the leader felt he needed to address the growing foreign pressure on Iran and rally support.
The Security Council - which began its meeting on Wednesday - will also discuss when a vote might be held, possibly as soon as this weekend.
The US has cleared the way for Iranian President Mahmoud Ahmadinejad to address the council in New York when the issue is voted on.