US President Donald Trump has threatened to withdraw from the agreement when it comes up for renewal on May 12, demanding his country's European allies "fix the terrible flaws" or he will re-impose sanctions.
"If the United States leaves the nuclear agreement, you will soon see that they will regret it like never before in history," reformist Rouhani said in a televised speech in northwestern Iran.
Trump speaks with Britain's May on Iran, North Korea
"Trump must know that our people are united, the Zionist regime (Israel) must know that our people are united," Rouhani said.
"Today all (Iran's) political factions, whether they be from the right, the left, the conservatives, reformers and moderates are united," he added.
The nuclear deal was struck in 2015 between Iran and Britain, China, France, Germany, Russia and the United States, then led by Barack Obama.
Under the pact, sanctions were eased in return for a commitment not to pursue a nuclear bomb, but Iran says it is not reaping the rewards despite complying with the deal.
A senior Israeli official said Sunday that Trump had not informed Israel of whether it will withdraw from the agreement.
"In effect, I don't know what Trump will decide because he hasn't told me," the official said on condition of anonymity, making clear Israel had not yet been told of Trump's decision.
Trump has consistently complained about the agreement, citing perceived flaws including 'sunset' provisions lifting some nuclear restrictions from 2025.
In an attempt to salvage the deal, French President Emmanuel Macron has recently pushed to extend its scope to address this issue, as well as the absence of any limits on Iran's conventional missile capabilities and Tehran's role in the region.
Britain's Johnson will on Monday begin a two-day visit to Washington, with the nuclear deal among issues on top of the agenda, the Foreign Office said.
He is due to meet US Vice President Mike Pence, National Security Advisor John Bolton and Congressional foreign policy leaders.
He said Britain - which remains committed to the agreement - the United States and Europe were "united in our effort to tackle the kind of Iranian behaviour that makes the Middle East region less secure - its cyber activities, its support for groups like Hezbollah, and its dangerous missile program".
Iran's support for Syrian President Bashar al-Assad, via the Lebanese armed group Hezbollah in Syria's civil war, and its backing for Shiite Houthi rebels in Yemen have added to frictions between Tehran and Western powers.
Rouhani vehemently reiterated his country's opposition to curtailing its non-nuclear missile capabilities, in his speech on Sunday. Tehran "will build as many missiles and weapons as needed" for its defence, he said.
"We are honouring our commitment, but we are telling the whole world we will not negotiate with anyone about our weapons and our defence."
Iran's president also said that while he is open to discussing the country's regional role, he would not abandon what he described as its fight "against terrorism."
"We want to talk to the world so that our region is safe" but "we will not allow you to create a new Daesh," he said, using an Arabic term for the Islamic State group.
Netanyahu to meet Putin in Moscow ahead of Iran deal deadline
While Rouhani did not elaborate on this point, Iran's ally the Syrian government has consistently referred to all armed opponents as 'terrorists' and accused the West of facilitating terrorism.
Iran has always denied it sought a nuclear weapon, insisting its atomic program was for civilian purposes.
Rouhani did not specify how Iran would react if the US pulls out of the 2015 deal.
But he said he had given "the necessary orders", notably to Iran's Atomic Energy Organisation, in anticipation of Trump's decision.
As the May 12 US decision point nears, Iranian leaders have shuffled between placatory and hawkish comments, although the hardliners have taken a uncompromising stance.
On Thursday Ali Akbar Velayati, the foreign policy adviser to Iran's supreme leader Ayatollah Ali Khamenei, warned Tehran would quit the nuclear deal if the United States withdraws.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ