Iranian President Hassan Rouhani says his government will not abandon the nuclear deal as it is beneficial for Iran, calling the US withdrawal "illegal."

Iran's President Hassan Rouhani arrives at the Austrian Chancellery in Vienna, Austria. July 4, 2018.
Iran's President Hassan Rouhani arrives at the Austrian Chancellery in Vienna, Austria. July 4, 2018. ( Reuters )

Iranian President Hassan Rouhani is in Vienna, where the country's nuclear agreement with world powers was drawn up three years ago, to promote the deal's survival after the United States withdrew.

Rouhani was meeting Austrian leaders on Wednesday following a visit to neutral Switzerland, which also hosted negotiations on the deal under which Iran agreed to limit its enrichment of uranium in exchange for the lifting of economic sanctions.

He said after meeting his Austrian counterpart that "we will not leave the (agreement), on condition that we can benefit from it."

Rouhani did not mention Austrian officials' announcement on Tuesday that they planned to revoke the legal immunity of an Iranian diplomat suspected of involvement in a plot to bomb an Iranian opposition rally in France. He took no questions.

Rouhani also said the US withdrawal from the deal was "illegal." 

"Not the United States, not any other country would benefit from this decision to withdraw from the accord," Rouhani said in the news conference, which was broadcast live on Iranian state television.