Iranian President Hassan Rouhani has lashed out at American officials for threatening to stop Iran's oil exports, saying they would never be able to carry out such a threat.

"The US [officials'] statement in this regard is unilateralism…and a breach of all international rules and regulations in energy and trade sectors," Rouhani said at a joint press conference with his Swiss counterpart, Alain Berset, in Bern on Tuesday.

He added that it is "incorrect and unwise" to think that "one day all oil producing countries would export their surplus oil and Iran would be the only country that cannot export its oil."

US President Donald Trump announced on May 8 that Washington was walking away from the nuclear agreement, officially known as the Joint Comprehensive Plan of Action (JCPOA), which was reached between Iran and the five permanent members of the UN Security Council - the United States, Britain, France, Russia and China - plus Germany in 2015.

Trump also said he would reinstate US nuclear sanctions on Iran and impose "the highest level" of economic bans on the Islamic Republic.

The sanctions would include a universal ban on Iran over buying or acquiring US dollars as well as restrictions over purchases of crude oil from the country and investing in its oil sector projects.

Read more:

Rouhani further reaffirmed Iran's stance on the JCPOA after the US withdrawal and said Tehran would stay in the deal as long as its interests are preserved and it is assured that it can use the agreement's advantages.

Under the JCPOA, Iran undertook to put limits on its nuclear program in exchange for the removal of nuclear-related sanctions imposed against Tehran.

Since the US president pulled Washington out of the historic nuclear deal, European countries have been scrambling to ensure that Iran gets enough economic benefits to persuade it to stay in the deal. The remaining parties have vowed to stay in the accord.

Iran's First Vice President Es’haq Jahangiri said on Sunday the country is considering oil exports by the private sector in a bid to thwart forthcoming US sanctions, which mostly aim to curtail the Islamic Republic's revenues by blocking its crude oil exports.

Addressing a conference held to mark National Day of Industry and Mine in Tehran, he said, “The target of the US is firstly [to cut down Iran's] oil [sales]. They want Iran's oil not to be sold, which is impossible and such measures are taken in line with a psychological war.”

Iran will remain committed to international undertakings: Rouhani

Addressing a joint economic forum in the presence of his Swiss counterpart, the Iranian president said Tehran has never carried out any measure against any country and would remain committed to international regulations, including the Non-Proliferation Treaty (NPT) and boost cooperation with the International Atomic Energy Agency (IAEA).

Last month, the IAEA Director General Yukiya Amano reaffirmed the agency's access to all the required nuclear sites in Iran, calling on Tehran to ensure "timely and proactive cooperation" with inspections under a 2015 nuclear agreement with world powers.

"As stated in my latest report to the Board [of Governors], the agency has conducted complementary accesses under the Additional Protocol to all the sites and locations in Iran which we needed to visit," Amano said in his introductory statement to the Board of Governors.

Rouhani further added, "Our policy has always been based on constructive interaction with the world…Iran calls for fair, legal, peaceful and stable relations with the world and will play its role well in this regard."

He noted that Iran attaches great importance to its ties with member states of the European Union, including Switzerland, and said Tehran and Bern are resolved to continue their cordial trade and economic cooperation in line with international regulations and mutual interests.

Rouhani emphasized that unilateralism has no place in the world in any field and said close relations among countries are the best way to meet common interests.

Iran, Switzerland sign documents for cooperation

In the presence of Rouhani and Berset, Iranian and Swiss officials issued two statements for scientific and health cooperation and signed an agreement for cooperation in the transportation sector.

Heading a high-ranking politico-economic delegation, President Rouhani arrived in Zurich, Switzerland, on Monday at the invitation of his Swiss counterpart. The Iranian president would leave Bern for Vienna later on Tuesday to meet Austrian President Alexander Van der Bellen and Chancellor Sebastian Kurz.