"Iran assumes Iraq's stability and security as its own stability and security and this has been proved in practice," Rouhani said during the meeting on the sidelines of the first Conference on 'World against Extremism and Violence (WAVE)' in Tehran on Tuesday.
Noting that Iraq has now gone past the worrying security conditions, he underlined that Iran is happy to see that the Iraqi army has been able to cleanse many parts of the country from the terrorists.
Rouhani also stressed that Iran seeks to further expand its intimate and brotherly relations with Iraq in all fields.
Jafari, for his part, lauded Iran's positive role in the establishment of security in the region, and said, "Iran helped the Iraqi nation before the (so-called anti-ISIL) coalition to prevent the fall of important provinces."
Iran and Iraq have enjoyed growing ties ever since the overthrow of the former Iraqi dictator, Saddam Hussein, during the 2003 US invasion of the Muslim country.
In November, Lieutenant Commander of the Islamic Revolution Guards Corps (IRGC) Quds Force Brigadier General Esmayeel Qa'ani said Baghdad remained untouched by ISIL terrorist group due to Iran's support and assistance.
"The ISIL terrorists sought to surround Baghdad but they failed in reaching their ominous goals thanks to Iran's supports," Qa'ani said in North Khorassan province.
Noting that the ISIL terrorists had been left with no more command center and are searching for new shelters, he said ISIL was becoming weaker and weaker day by day and was being annihilated.
Also last month, senior military officials in Baghdad said Commander of the IRGC Quds Force Major General Qassem Soleimani planned the liberating operations of Jurf al-Sakher from the ISIL terrorist group's occupation some three months ago.
After the ISIL fled from the embattled town of Jurf al-Sakher in October, the Iraqi military gained a victory against the extremist group, with state television showing tanks and Humvees parading through the town and soldiers touring government buildings that had been occupied by the militants since August.
Photos soon emerged on independent Iraqi news websites revealing presence of the powerful Iranian general Soleimani, whose name has become synonymous with the victories of Iraqi ground forces.
An Iraqi commander, who agreed only to be identified by his nickname, Abu Zeinab, said in November that Soleimani began planning the Jurf al-Sakher operation three months ago.
Militia commanders told the AP that General Soleimani was on the front lines in Jurf al-Sakher, providing weapons training to some 7,000 troops and militia fighters, and coordinating with military commanders ahead of the operation.
Some other militia commanders, who spoke on condition of anonymity because they were not authorized to talk to the media, described Soleimani as “fearless” — one pointing out that the Iranian general never wears a flak jacket, even on the front lines.
“Soleimani has taught us that death is the beginning of life, not the end of life,” one commander said.
The crisis in Iraq escalated after the ISIL militants took control of Mosul in a lightning advance on June 10, which was followed by the fall of Tikrit, located 140 kilometers (87 miles) Northwest of the capital, Baghdad.
They have been carrying out horrific acts of violence, including public decapitations and crucifixions, against all Iraqi communities such as Shias, Sunnis, Kurds, Christians, Ezadi Kurds and others.
The West and its regional allies, including Qatar, Saudi Arabia, and Turkey, are giving financial and military support to the militants.