Hassan Rouhani
Hassan RouhaniReuters

Iranian President Hassan Rouhani claimed on Monday that Iran's position in the Middle East had never been stronger, but warned that the regime was at risk unless infighting between political factions was curbed.

"The greatness of the nation of Iran in the region is more than at any other time," Rouhani said in a speech in Tehran, carried by the state broadcaster and quoted by AFP.

"In Iraq, Syria, Lebanon, northern Africa, in the Persian Gulf region -- where can action be taken without Iran?" he added.

Rouhani did not directly respond to comments on Sunday by U.S. Secretary of State Rex Tillerson, who called on Iran-backed militias fighting jihadists in Iraq to "go home".

At the same time, Rouhani warned that Iran's regime was under threat from fierce infighting between conservatives and moderates at home.

"We should not think that damaging one part of the system will strengthen the other part. No, the whole system will collapse," he said.

Rouhani, touted by the West as a “moderate”, won re-election in a landslide five months ago and, as part of his campaign, he repeatedly spoke out in public against hardliners, particularly the Revolutionary Guards who have great political influence in the country.

He appeared to have a change of heart two weeks ago, when he warned U.S. President Donald Trump against blacklisting the Revolutionary Guards, saying that doing so would be a “mistake beyond mistakes”.

Hardliners have criticized the nuclear deal Rouhani's administration signed with world powers in 2015.

On Sunday, state television read out in its entirety a letter by Supreme Leader Ayatollah Ali Khamenei from 2015 in which he warned against trusting the United States and other signatories to the deal.

Although the accord was explicitly endorsed by the Supreme Leader, hardliners have consistently lambasted Rouhani for going too far in his efforts to rebuild ties with the West.

Those criticisms have become more pointed in recent days as Trump has refused to recertify the deal, throwing its future into doubt.

Rouhani insisted on Monday that Trump was failing in his efforts to undermine the deal.

"Every day (Trump) says this agreement is the worst deal in history. As he put it, it is shameful for America. But still he hasn't been able to do anything with this agreement," Rouhani said, according to AFP.

Iranian leaders have stepped up their rhetoric in recent days and weeks as it became clearer that Trump was planning not to recertify the deal.

Rouhani criticized Trump's speech and vowed to expand Iran's ballistic missile program.

Speaking on Iranian television, Rouhani dismissed Trump's “insults and fake accusations", and said that Iran would stick to the nuclear agreement as long as it was beneficial.

Khamenei last week declared that Tehran would stick to the 2015 nuclear deal as long as the other signatories respected it, but would "shred" the agreement if Washington pulled out.