Iran's supreme leader Ayatollah Ali Khamenei on Tuesday told Iraq's visiting premier that the Baghdad government is capable of defeating Islamic State jihadists without foreign troops being deployed.
The military campaign against IS now encompasses US and other foreign air strikes in Iraq and neighbouring Syria, but more than four months after breaking into the country IS retains strongholds in the north and west while trying to seize other territory.
Having threatened to reach Baghdad's outskirts, some Iraqi officials and Sunni tribal leaders in areas most affected by the unrest have argued that the world should step up its military involvement to a ground intervention against IS.
But Khamenei, whose authority surpasses Iran's politicians on all matters, knocked down the idea, saying he believed Iraqis had "the capacity to overcome the terrorists and establish security" alone without the "need for foreign presence".
"We stand beside you and will seriously defend your government like the previous government," Khamenei, quoted by state television, said in a meeting in Tehran with Iraq's Prime Minister Haidar al-Abadi.
"Iran recognises the security of Iraq, (our) neighbour and brother country, as its own security."
To counter an offensive launched by the Islamic State group (IS) on June 9, Iran has supplied Iraqi Kurds with weapons and sent military advisers to Baghdad, while denying it has deployed ground troops.
In early October, Iranian television published a rare picture of its elite Quds Force chief, Major General Qassem Suleimani, on an Iraqi battlefield alongside Kurdish peshmerga forces. A series of photos published on social media in recent weeks have appeared to corroborate his presence.
And in September, a senior Iranian military official threatened to attack deep inside Iraq if the IS jihadists approached his country's border.
Tehran, which has refused to join the international coalition against IS, advocates regional support for the Iraqi and Syrian governments, and says that air strikes are insufficient.
Before flying to Iran, Abadi ruled out any foreign ground intervention to assist government forces in retaking territory lost to the jihadists.
Signup to our newsletter and follow us on Facebook and Twitter!
But at the same time the Iraqi premier appeared to set restrictions on Iran, saying no "regional power will fight here".
- 'Extremists threaten region' -
On Tuesday during his first official visit to Iran since his appointment last month -- he took over after Nuri al-Maliki's failed bid to win a new term after the IS offensive brought Iraq close to collapse -- Abadi said Iraq was at war with "terrorists" who threaten the whole region.
"Iraq is not fighting terrorism only. It is an extensive war with all these groups," he said, alluding to IS and other extremist fighters such as Al-Qaeda's Syria affiliate Al-Nusra Front.
"It's a threat to the region and these terrorist groups are trying to create a division between Shiites and Sunnis," Iran's official IRNA news agency quoted him as saying.
Abadi, from Iraq's Shiite majority, also met with President Hassan Rouhani and Vice President Eshaq Jahangiri.
The visit was originally scheduled to last one day but will continue on Wednesday with Abadi set to meet influential former president Akbar Hashemi Rafsanjani and parliament speaker Ali Larijani.
As mainly Shiite neighbours, Iran and Iraq have been close since the ouster of Sunni dictator Saddam Hussein in the 2003 US-led invasion of Iraq, with Tehran's role becoming increasingly open in recent years.
Iran had resolutely backed Maliki since he took office in Baghdad in 2006, but lost faith in him after the capitulation of the Iraqi military in the face of only a few thousand IS jihadists.