After talks with al-Maliki on Tuesday, Iran's president Mahmoud Ahmadinejad said: "We will give our full assistance to the Iraqi government to establish security in [Iraq].
"Strengthening security in Iraq means strengthening security and stability in the region."
Al-Maliki is believed to have delivered a blunt message to Ahmadinejad, telling Iran not to interfere in Iraq's affairs.
It is a message that may please the Iraqi prime minister's sponsors in the US, who accuse Iran of funding and training fighters engaging US forces in Iraq.
Before the meeting, Ali al-Dabbagh, the Iraqi government spokesman, said Iraqis no longer wanted to suffer for "messages between the United States and Iran".
Al-Maliki will meet Iran's supreme leader Ayatollah Ali Khamenei on Wednesday as part of his first official visit to Iran since becoming prime minister.
Stopping short of explicitly endorsing US accusations of Iranian "meddling" in Iraq, al-Dabbagh said on Monday: "We want to pass a message to the Iranian leaders that Iraq needs good relations with neighbouring countries, without interference in our internal affairs."
US and British officials say high-powered explosives used against their soldiers in the past year have been supplied through Iran, though not necessarily with government approval.
Al-Maliki lived in Iran during the 1980s to escape Saddam's persecution of his Islamic Dawa party in Iraq. At that time Baghdad was at war with Tehran.
Al-Dabbagh said that Baghdad saw Khamenei playing a major role in relations with Iraq and stressed that security would top the agenda.
Some Iraqi Shia leaders have offered to mediate between Tehran and Washington, which have not had diplomatic relations since Iran's Islamic revolution in 1979.
Asked whether such mediation would feature in al-Maliki's talks, al-Dabbagh said: "Iraqis would like to see a normal relationship between the United States and Iran.
"This situation, we are paying for it in Iraq. Iraq has been used to pass messages between the United States and Iran. We want to avoid all tension."