An Iranian general killed in the Syrian city of Aleppo had taken part in 80 missions in the war-torn country, mourners were told at his funeral in Tehran on Sunday.
Hossein Hamedani of the Islamic Republic's Revolutionary Guards Corps became its highest-profile casualty of the effort to shore up Syrian President Bashar al-Assad when he died Thursday.
He had been involved for four years in Iran's operations in Syria, creating paramilitary "national defense forces" for Assad, a fellow general and former chief commander of the Guards said in Tehran.
"Our security is not confined to our borders, it is related to the entire region. Hamedani was martyred in Syria so that insecurity does not reach Tehran," General Mohsen Rezaie, who recently came out of retirement to rejoin the military, said in tribute.
Hamedani was killed by "Daesh terrorists" he added, using the Arabic acronym to refer to the jihadist Islamic State (ISIS) group that swept much of Syria and Iraq last year, since holding ground.
Thousands attended Hamedani's ceremony. He will be buried in Hamedan, his home city, on Monday.
Iran's supreme leader Ayatollah Ali Khamenei praised Hamedani as "a sincere and diligent warrior" in a note of condolence to his family on Saturday.
Ali Shamkhani, secretary of Iran's Supreme National Security Council, described Hamedani's death as "a huge loss" in the fight against Sunni jihadist groups in Syria.
Quoted by the IRNA news agency, he said the loss would be "avenged" and that this would lead to the "complete destruction" of these groups.
Shia Islamist-ruled Iran is Assad's strongest regional ally and it has sent Guards as military advisers and as frontline special forces to help him against Sunni Muslim rebels seeking his overthrow.
Lebanon's Shia jihadi terror group Hezbollah has done much of the fighting to prop up the Syrian army, though the commander of the Revolutionary Guards' foreign wing, Qassem Soleimani, is said to be heavily involved in guiding military strategy.
AFP contributed to this report.