Iran is one of the main international backers of Syrian President Bashar al-Assad and has sent military advisers and thousands of "volunteers" to fight IS on the ground in Syria and Iraq.
In a televised speech Rouhani thanked "all the fighters of Islam", supreme leader Ayatollah Ali Khamenei and the armed forces of Iraq and Syria for "the end of this group that brought nothing but evil, destruction, murder and savagery".
He congratulated Iran's Revolutionary Guards and its foreign arm the Quds Force for a "great victory" but insisted that the "main work was accomplished by the people and armies of Syria, Iraq and Lebanon".
Iranian media on Sunday and Monday showed footage of Quds Force commander Qassem Soleimani in the Syrian border town of Albu Kamal, reporting he personally directed operations that recaptured the jihadists' final urban bastion over the weekend.
Also Read
In a message released by the Revolutionary Guards, Soleimani congratulated supreme leader Khamenei on this "decisive victory" over IS.
"I announce the end of this group," the statement said.
He also hailed the role of Iraq's Hashed al-Shaabi paramilitary coalition -- dominated by groups backed by Tehran -- and the "decisive" role of Lebanon's Iranian-allied Hezbollah movement in the fighting in Syria.
Neither the Syrian nor Iraqi governments have so far declared definitive victory over the group.
Disclaimer: No Business Standard Journalist was involved in creation of this content