Thousands of Iranians are mourning the death of a young Revolutionary Guard soldier beheaded by the Islamic State group in Iraq at state funeral in Tehran.

The death of 25-year-old Mohsen Hojaji has struck a nerve in Iran, which has suffered casualties while its troops are deployed in Iraq to fight IS and in Syria, where they support the government of embattled President Bashar Assad.

His funeral Wednesday in Tehran brought Supreme Leader Ayatollah Ali Khamenei, who prayed near his Iranian-flag-wrapped casket.

Since his death, artists and others have memorialized Hojaji's death in videos and paintings. Acts of mourning and acknowledging sacrifices are a sacred aspect of Shiite Islam.

His death also has muted domestic criticism of Iran's foreign military operations, especially in Syria.