(CNN) Iranian President Hassan Rouhani is warning the US that war with Iran would be "the mother of all wars" but did not rule out the possibility of a peace agreement.

Americans "must understand that war with Iran is the mother of all wars and peace with Iran is the mother of all peace," Rouhani said while addressing diplomats Sunday in Tehran, according to Iran's state-run news agency IRNA.

The Iranian leader also had a message for US President Trump: "do not play with the lion's tail, because you will regret it eternally."

His comments come months after the Trump administration announced that the US is quitting the Iran nuclear deal brokered during the Obama administration and reinstating sanctions on the country. The sanctions are set to be reimposed November 4 , and more than 50 international firms have said they will leave the Iranian market, Brian Hook, a State Department policy and planning director, said earlier this month.

The 2015 agreement, between Iran and the US and other powers, had agreed to ease sanctions on Iran if the country reined in its nuclear program. But in a split with European allies, Trump said in May that the deal was a disaster and decided to leave the pact.

Read More