Thousands of weeping Egyptians have said farewell to Ahmed Zaki, one of the country's best-loved actors, who died in Cairo on Sunday aged 55.
Zaki's coffin was borne aloft covered with an Egyptian flag
Government officials, including several ministers, and top artists gathered at Mustafa Mahmud mosque to pray over him.
The square outside was packed with mourners who pressed to lay their hands on Zaki's casket for a final farewell.
The funeral was filmed at the actor's request to be used in his final film, a biopic of singer Abdul Halim Hafez.
"Perfection was his obsession and he wanted to see the film done before passing away," said Imad Adeeb, who is producing the unfinished film.
The funeral was broadcast live on television in Egypt and across the Arab world.
Black-clad presenters on Egyptian television were unable to hold back their tears as they described the ceremony.
His body was taken to 6 October City, outside Cairo, for burial.
Player of presidents
Zaki was considered by many critics the best Arab actor of his generation.
He began his career in the early 1970s playing romantic heroes and villains - and was the first dark-skinned actor to take leading roles in Egypt's conservative cinema industry.
Police held crowds of mourners away from the mosque
In two of his biggest films, he portrayed Egypt's last two presidents - Gamal Abdul Nasser in Nasser '56 (1996) and Anwar Sadat in Days of Sadat (2001).
The film Halim deals with the life of another famed Egyptian artist, Abdul Halim Hafez, who also died at a relatively early age, causing consternation throughout the Arab world in 1977.
Producer Imad Adeeb said the ailing star insisted on leaving his hospital bed to shoot more scenes, even though the scenery was sometimes not ready.
Zaki's 21-year-old son Haitham will film the remaining scenes of Halim, playing Hafez in his youth.