"Iran stands beside the Iraqi nation in fighting terrorism and has not set any conditions for its aids," Rouhani said during the meeting in Tehran on Tuesday.
Expressing confidence that the Iraqi people and army are able to defend their country and there is no need for the military presence of foreign states, he said, "Safeguarding Iraq's unity and territorial integrity is important to the Islamic Republic of Iran since it is a united Iraq which can help to the establishment of stability in the region."
Rouhani said that the regional states should cooperate with each other in fighting extremism, terrorism, violence and the schemes for decreasing the oil prices.
He also appreciated Maliki for his efforts to restore security and stability in Iraq.
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 relevant remarks yesterday, Supreme Leader of the Islamic Revolution Ayatollah Seyed Ali Khamenei lauded Maliki for his efforts to restore stability and increase progress in Iraq.
"During the power transition in Iraq, you did a great job by preventing turmoil and instability in Iraq and this will never be forgotten on Iraq's scene," Ayatollah Khamenei said in a meeting with Maliki in Tehran on Monday.
He also praised Maliki's good understanding of Iraq's problems, and said, "Your method for helping the new government of Mr. Haider al-Abadi to create unity among different forces in Iraq is a very good move which should continue."
Maliki, for his part, thanked the Islamic Republic of Iran for its aids to the Iraqi government and nation in the fight against terrorists and alien elements.
Analysts believe that Maliki's decision to stay aside from power in August after a series of conflicts in Iraq saved the country from plunging into further political turmoil.
Al-Maliki withdrew his nomination for a third term in office, and backed the nomination of al-Abadi for the post of prime minister then.
Al-Maliki made his decision after a meeting with al-Abadi mediated by the country's Vice-President Khudhair al-Khuzaie and former Prime Minister Ibrahim al-Jafari, who is also a leading figure in the powerful Iraqi National Alliance, a major Shiite bloc.