The Islamic State group has claimed the killing of a senior Iranian officer advising Iraqi forces in their fight against the jihadists, in posts on jihadist Internet forums on Monday.
Iran's Revolutionary Guards on Sunday announced the death of Brigadier General Hamid Taghavi, who had been training the army and Iraqi volunteers in the city of Samarra, north of Baghdad.
One jihadist forum posted an image of the officer standing next to three others, with a red circle around his head and the caption: "A photo of the miscreant Hamid Taghavi who was killed by the men of IS in the region of Samarra."
Another image on the forum purportedly showed the body of the Iranian officer.
IS has not said how Taghavi died, but his funeral was held in Tehran on Monday in the presence of several senior officials.
"If people like the martyr Taghavi were not engaged in Syria and Iraq against the terrorists, the enemy would surely look to create insecurity in our country," Supreme National Security Council secretary Ali Shamkhani told mourners, the official Fars news agency reported.
Shiite Iran has sent military advisers to Iraq to help train and equip troops and allied militias in their counter-offensive against IS, which seized large areas of the country in a lightning June assault.
It has also armed Kurdish forces in northern Iraq and Iranian media have reported the deaths of several military personnel in both Iraq and Syria this year.
Signup to our newsletter and follow us on Facebook and Twitter!
Iranian Defence Minister General Hossein Dehgan on Monday underscored his country's support for Iraq, during talks in Tehran with his Iraqi counterpart Khaled al-Obeidi.
"The Islamic Republic of Iran's support for the army and military forces of Iraq is a strategic policy," he said, according to the official IRNA news agency.
Tehran is "ready to develop military cooperation with Iraq in order to boost its defensive capacity", he added.
IRNA said Obeidi also insisted on the "strategic" cooperation between the two neighbours and urged Iran to step up its assistance to Baghdad to fight "terrorism and corruption".
Iran did not join a US-led coalition conducting air strikes against IS positions in Iraq and neighbouring Syria.
Samarra, 110 kilometres (70 miles) north of Baghdad, is a mainly Sunni city but also home to the Askari shrine, one of the holiest sites in Shiite Islam.
Several Iranian officials, including President Hassan Rouhani, have declared the preservation of Iraqi Shiite sites a "red line".