The United States has failed to undermine the nuclear deal between Tehran and world powers, Iranian President Hassan Rouhani said in a statement broadcast on state television.

His comments on Sunday came just days after US President Donald Trump threatened to withdraw from the deal if its "disastrous flaws" were not fixed.

"The American administration has failed to undermine the nuclear deal ... Trump, despite his repeated efforts, has failed to undermine the accord," Rouhani said in his speech, according to a report from the Reuters news agency.

The Iranian president further hailed the deal as "a long-lasting victory for Iran".

On Friday, the White House said that Trump would waive sanctions against Iran to keep the deal alive, but it would be the "last time" unless the US and Europe reach an agreement in the next 120 days to strengthen the landmark agreement.

"I have outlined two possible paths forward: either fix the deal's disastrous flaws, or the United States will withdraw," Trump said. "This is the last chance. In absence of such an agreement [between the US and European powers], the United States will not again waive sanctions in order to stay in the Iran nuclear deal."

Trump has repeatedly threatened to tear up what he has described as "the worst deal ever negotiated".

Iran has said it will not accept any changes to the terms of the 2015 nuclear deal, which eased sanctions on the country in exchange for Tehran halting uranium enrichment.

Trump is required to renew the existing deal every 120 days under US law.

Mohammad Javad Zarif, Iran's foreign minister, on Friday accused Trump of "desperate attempts to undermine a solid multilateral agreement", while European leaders have urged "all parties to continue to fully implement this agreement".