Iranian President Hassan Rouhani has said that Riyadh's revamped hostility towards Tehran is an attempt to cover up its regional failures and domestic troubles.

"Saudi Arabia is trying to solve two problems, this is way it introduces Iran as its enemy," said Rouhani during a televised interview on Tuesday.

He noted that the Saudis' first problem is to somehow mask its regional failures.

Saudi Arabia failed in Qatar, failed in Iraq, in Syria and recently in Lebanon, he said, adding that they failed in all these areas.

Rouhani noted that Riyadh's second problem was" internal differences and chaos in the kingdom."

In an interview with the New York Times published on Thursday, Saudi Crown Prince Mohammed bin Salman made an analogy between Iran’s growing regional influence and Germany’s hegemonic policies in the Hitler era and said, “We learned from Europe that appeasement does not work.”

Saudi Arabia has been pursuing an open warmongering policy toward Iran. Earlier this year, Mohammed bin Salman threatened to move the “battle” to Iran.

The Iranian president also reiterated that Iran's foreign policy was based on resolving regional issues via dialog, not confrontation.

He said Iran’s regional ties had generally improved, especially with Turkey, Iraq, Afghanistan, Pakistan and Qatar.

Referring to Iran's historic nuclear deal, Rouhani stressed that the JCPOA (the Joint Comprehensive Plan of Action) had resulted in "indestructible gains" for the nation.

The JCPOA was reached between Iran and the P5+1 group of countries — namely the US, Russia, China, France, and Britain plus Germany — in July 2015. Under the deal, Iran undertook to apply certain limits to its nuclear program in exchange for the termination of all nuclear-related sanctions against Tehran.