US President Donald Trump tells Iran to be careful with the threats. (File photo)

US President Donald Trump warned Iran Wednesday its threats could "come back to bite" after Tehran vowed to exceed the maximum uranium enrichment level allowed by a landmark 2015 nuclear accord.

"Iran has just issued a New Warning. Rouhani says that they will Enrich Uranium to 'any amount we want' if there is no new Nuclear Deal," Trump tweeted, referring to Iran's President Hassan Rouhani.

"Be careful with the threats, Iran. They can come back to bite you like nobody has been bitten before!"

Iran is acting on its May 8 threat to suspend parts of the agreement in response to Trump's reimposition of crippling sanctions after withdrawing from it in May last year.

Rouhani said Wednesday's decision to exceed the enrichment limit was in response to failure by other parties to the deal to keep up their promises and provide Iran relief from the US sanctions.

The enrichment maximum set in the agreement is sufficient for power generation but far below the more than 90 percent level required for a nuclear weapon.