Christians paid final respects on Sunday to Pope Shenouda III, who spent the last months of his four decades at the head of Egypt's Orthodox Church trying to soothe sectarian tensions that have escalated since the ouster of President Hosni Mubarak.
Ten of thousands queued at the cathedral where Shenouda's body was initially laid in a coffin and later seated on a ceremonial throne wearing gold and red embroidered religious vestments, a golden mitre on his head and holding a gold-topped staff.
The lines blocked traffic in central Cairo and some women and elderly fainted in the heat. The cathedral opened and closed its doors several times in an attempt to contain the crowds.
Two people were killed in the crowding, medical sources said. One suffered a heart attack and the other, an elderly citizen, died of exhaustion.
Mubarak, who suppressed Islamists, was ousted last year. Since then Shenouda, who died on Saturday aged 88, often called for harmony and regularly met Muslim and other leaders.
Christians, who comprise about a tenth of Egypt's 80 million people, have long complained of discrimination and in the past year stepped up protests, which included calls for new rules that would make it as easy to build a church as a mosque.
Christians have accused hardline Islamists of attacking churches and said the authorities have failed to step in to protect them, although experts say some recent incidents have been fuelled by local grudges as well as sectarian tensions.
Shenouda had served as the 117th Pope of Alexandria since November 1971, leading the Orthodox community who make up most of Egypt's Christians. His funeral will be held on Tuesday, Egyptian state media reported.
Interim military rulers paid tribute to the church, visiting the grounds of the Orthodox Coptic Cathedral in Cairo. Field Marshal Mohamed Hussein Tantawi who Mubarak handed power to promised to air lift Shenouda's body to where he will be buried.
U.S. President Barack Obama offered his condolences and Pope Benedict, leader of the world's Roman Catholics, offered prayers after being informed of his death.
I would like to express to the members of the Holy Synod, to the priests and to the faithful of the Patriarchy, my strongest feelings of fraternal compassion, said Benedict.
Describing Shenouda as a long-time advocate of unity among Christians, he said the Catholic Church shares the pain afflicting Orthodox Copts.
Shenouda was popular among many of Egypt's Christians even outside the Orthodox Church, as well as among many Muslims. However, some Christian activists said Shenouda should have pushed the state harder to secure more rights for Christians.
In one phrase Shenouda often repeated and which was also cited in newspapers on Sunday, he would say: Egypt is not a nation we live in, rather it is a nation that lives in us.
The burial is expected to take place at the Wadi el Natrun monastery in the desert northwest of Cairo, where the late pope had requested he be buried.
Shenouda was banished to Wadi el Natrun monastery in 1981 by then-President Anwar Sadat after he criticised the government's handling of an Islamic insurgency in the 1970s and Egypt's 1979 peace treaty with Israel.
Under Mubarak's rule, relations between the government and the Coptic church were generally smooth, with the pope portrayed in state media as a symbol of religious harmony, despite occasional outbreaks of sectarian violence.
We will remember Pope Shenouda III as a man of deep faith, a leader of a great faith, and an advocate for unity and reconciliation, the U.S. president said in a statement issued by the White House.
Obama said Shenouda had been committed to national unity and was a beloved leader of Egypt's Coptic Christians and an advocate for tolerance and religious dialogue.
Shenouda publicly supported Mubarak during his last days and before Mubarak's ouster by a popular uprising on February 2011, a move that drew some criticism from some members of his church who joined the protests that ousted the president.
Some Muslim leaders also backed Mubarak in his last days.
Bishop Bakhomious, head of the church of Bahaira, a district in the Nile Delta north of Cairo, will temporally hold the post of pope for two months until a new leader is elected.
Egyptian media described the procedure for choosing a new pope as one based on a system of voting by board members of the church's city councils. The councils vote on three preferred candidates, and the final choice is made when a name is picked out of a box by a young child, the media said.
(Additional reporting by Ahmed Tolba and Dina Zayed; Editing by Edmund Blair and Mark Heinrich)