Rouhani warns US against 'political suicide'
At his swearing-in ceremony, Mr Rouhani said Iran would continue to abide by the terms of the deal as long as the other signatories do the same.
The White House says Iran is complying with the deal but Mr Trump says Iran is violating its spirit.
Last month the US state department announced new sanctions on the country.
The US says the sanctions relate to Iran's missile programme and alleged support for terror groups but Tehran says they violate the nuclear deal.
Mr Rouhani - being sworn in for a second term after winning presidential elections in May - said he had nothing to do with "newcomers to the world of politics" and urged "old-timers" to see the nuclear deal as an example of how to manage international relations.
"Those who want to tear apart the JCPOA [nuclear deal] should know that they would also be tearing apart their political life," he said in a ceremony broadcast live on state TV.
He accused the US of a "lack of commitment" to the deal and said it was an "unreliable partner".
Meanwhile Iranian officials have been urging Europe not to side with the Trump administration.
Foreign Minister Javad Zarif said Mr Trump was "trying to destroy the nuclear accord at Iran's expense" and said "Europe should be conscious of this", private Tasnim news agency said.
Ali Akbar Velayati, a senior adviser to Iran's Supreme Leader Ayatollah Ali Khamenei, asked Europe to "take a more independent policy towards Iran", state media reported.
Mr Rouhani won 57% of the vote in May's election after promising to create jobs and build bridges with the outside world.
Related news releases
- 19.07.2018Civilians killed in Afghanistan air strike: officials
- 19.07.2018Buildings collapse in Delhi killing at least three, more feared dead
- 19.07.201810 injured in 4 explosions in Iraq’s Kirkuk
- 18.07.2018Yemen's Houthis say they attacked Aramco refinery in Riyadh with drone
- 17.07.2018Unknown military aircraft crashes in Northern Syria
- 17.07.2018Women in Saudi Arabia Will Soon Be Able to Train as Pilots
- 17.07.2018Iran ready to boost uranium enrichment if talks with EU fail - Official
- 17.07.2018Protests in Iraq leave 5 dead, 190 injured
- 17.07.2018Syrian army says it captures strategic hill overlooking Israeli border
- 15.07.2018Indonesian police shoot dead three suspected militants
- 15.07.2018Rouhani: "The US ‘more isolated than ever’ over Iran sanctions"
- 14.07.2018At least 10 killed by landslide in northern Myanmar
- 14.07.2018Velayati: Russia wants to create joint electrical grid with Iran, Azerbaijan
- 14.07.2018China floods wreak havoc, block roads and railways
- 14.07.2018Palestinian teenager killed in Israel-Gaza border protests
- 13.07.2018Suicide bomber kills 128 in attack on Pakistani election rally
- 13.07.2018Former Pakistani premier Sharif arrested in Lahore
- 13.07.2018Indian planes carrying more than 300 people avoid mid-air collision by 200 feet
- 12.07.2018FBI Presents New Details on Lead Up to Saddam Hussein's Interrogation
- 12.07.2018Kim Jong-un: "Extraordinary efforts' made by Trump for improving US-N Korea ties
- 11.07.2018Iran Supreme Leader's aide hails 'strategic' ties with Russia before Putin talks
- 11.07.201812 killed in election rally in NW Pakistan
- 10.07.2018Death toll in Japan flood disaster rises to 156
- 10.07.2018Last remaining kid, coach evacuated from Thai cave - media
- 10.07.2018At least 140 dead after heavy rain and landslides in Japan
- 09.07.2018Death toll rises to 126 in W. Japan after flood, rain
- 08.07.2018Japan floods and heavy rain leave at least 41 dead, dozens missing - UPDATED
- 07.07.2018North Korea regrets US stance at talks
- 07.07.2018Iran calls for EU help as shipping giant pulls out for fear of U.S. sanctions
- 07.07.2018Insider attack in S. Afghanistan kills 1 US serviceman, injures 2 others - NATO - UPDATED
- 07.07.2018Indian army kills 3 civilians in southern Kashmir
- 07.07.2018Both sides seek to 'clarify' as Pompeo holds second day of North Korea talks
- 07.07.2018No breakthrough in nuclear talks as Iran demands more after U.S. exit
- 07.07.2018Israeli air strike hits Syria at Golan frontier
- 07.07.2018Palestinian killed as Gaza protests against Israel enter fourth month
- 07.07.2018Second Saudi teen kills self after playing online game
- 06.07.2018Iranian leader describes EU proposals to save JCPOA as ‘disappointing’
- 05.07.2018German Coalition parties reach deal on Migration
- 05.07.2018Iranian FM summons German, French, Belgian diplomats
- 05.07.2018Pakistani court sends fake degree mill owner to jail
- 06.08.2017Clandestine Isis unit training Britons to launch attacks on UK
- 07.08.2017India kills '5 militants' along Kashmir de facto border
- 07.08.2017Iran arrests members of Daesh-linked group suspected of plotting terror attacks
- 06.08.2017Former minister elected as new vice president of India
- 05.08.201743 civilians killed in U.S.-led airstrikes in Syria's Raqqa
- 05.08.2017US’ Tillerson arrives in Philippines for ASEAN Forum