Iran will never seek nuclear weapons - with or without the nuclear deal, Iranian President Hassan Rouhani said on Wednesday.

He also called on European powers to avoid the United States' "mistake" of violating the historic 2015 nuclear accord with major powers.

"We have never sought nuclear weapons ... With or without the nuclear deal, we will never seek nuclear weapons," said Rouhani, according to his website.

More:

Rouhani said his country was still committed to the agreement, but warned any violation by signatories to the Joint Comprehensive Plan of Action (JCPOA) - as it's formally known - will have consequences.

In reaction to Washington's withdrawal from the deal in 2018 and its reimposition of crippling sanctions, Iran has gradually rolled back its commitments.

"I'm telling European countries: we are in the JCPOA. We haven't withdrawn from the JCPOA. We don't want to destroy the JCPOA. We are committed to the JCPOA. The reduction in our commitments is according to the JCPOA.

"If you violate, if you renege on an agreement, you are responsible for all consequences. We are not responsible for the consequences," said Iran's president.

'Tougher decisions'

Rouhani said Iran could reverse its steps away from compliance if other parties fulfilled their obligations.

However, Rouhani's chief of staff, Mahmoud Vaezi, warned on Wednesday that quitting the nuclear deal was one of Iran's options, according to the official IRNA news agency.

The threat came after European nations suggested they may bring Iran's breaches of the accord to the UN Security Council, which could lead to the reimposition of UN sanctions.

"It was discussed that it's possible some may take Iran's file to the Security Council ... If this happens we will take tougher decisions - such as leaving the nuclear deal," said Vaezi, adding Rouhani previously raised the possibility in a letter to the European powers.

Other Iranian officials have threatened a range of steps, including quitting the deal or even withdrawing from the 1968 Non-Proliferation Treaty (NPT), the basis for global nuclear arms control since the Cold War.

'Avoid military escalation'

French President Emmanuel Macron said on Wednesday that France will be inflexible about Iran's nuclear ambitions, and his country is determined Tehran will never acquire nuclear weapons.

"In the current context, France is determined that Iran never acquires a nuclear weapon, but also that we avoid all military escalation in the region," Macron said.

Iranian Foreign Minister Mohammad Javad Zarif said Europe yielded to pressure from Washington by launching the dispute mechanism in the nuclear pact. He has cited a threat of US tariffs if European capitals did not take action.

"When E3 sold out remnants of #JCPOA to avoid Trump tariffs last week, I warned that it would only whet his appetite," he tweeted. "EU would do better to exert its sovereignty."

European diplomats say they would have triggered the dispute mechanism regardless of any US tariff threats.