Ahmad Vahidi, a general and senior commander in the powerful Revolutionary Guard, is seen in images shown in Iranian state media.
After not being seen in public for the past four months, Vahidi is seen praying and placing his hands on a coffin said to contain the remains of Ayatollah Ali Khamenei.
In the shifts in power during the war, Ahmad Vahidi, the Guard and other more confrontational forces are considered to have gained even more power and influence, not least over the ongoing negotiations with the US and the military threats in the Strait of Hormuz.
Five coffins on stage
A funeral ceremony for Iran's longtime supreme spiritual leader - who was killed in an attack on Tehran in connection with the outbreak of war in February - will be held in Tehran after much fanfare starting this weekend. Dignitaries from various countries and movements have come to show their participation.
Five coffins, four large and one small, have been placed on a stage at a religious facility in Tehran. The coffins are said to contain the remains of Ali Khamenei and several of his family members who were also killed.
Former Russian President Dmitry Medvedev was on hand to honor Khamenei. Pakistani Prime Minister Shehbaz Sharif and Afghan Foreign Minister Amir Khan Muttaqi were also present, according to state-controlled Iranian television.
The ceremonies begin in the Iranian capital on July 4, when three public holidays have been declared there. The process then continues in various parts of the country and also in Iraq until July 9, when the actual burial takes place in Khamenei's hometown of Mashhad.
Contact with the son?
Ali Khamenei was the supreme leader of the Shiite Muslim regime for almost 37 years. His son Mojtaba Khamenei has been elected as his successor, but he has not been seen at all during the war and is reported to have been seriously injured.
Ahmad Vahidi took over the leadership of the paramilitary Revolutionary Guard in March after the previous leader was killed in US-Israeli strikes. He is believed to be one of the few people in direct contact with Khamenei the Younger.





