WADI NATROUN, Egypt (AP) — Pope Shenouda III, an giant figure for 40 years at the helm of Egypt’s Coptic Orthodox Church, was laid to rest on Tuesday in a desert monastery after a moving funeral Mass at a Cairo cathedral attended by tens of thousands.

Shenouda’s death brought an outpouring of expressions of Muslim-Christian unity in this mainly Muslim and conservative Arab nation, but it may have done little to hide the alarm of Egypt’s Christians over the political ascent of Islamists.

Away from the volatile sectarian politics of Egypt, the death of Shenouda united the nation’s 10 million Christians in grief, alongside anxiety over the future.

Local clerics, visiting clergymen and dignitaries packed St. Mark’s Cathedral in Cairo as deacons chanted somber hymns and bearded, black-clad priests and monks recited prayers and as incense smoke flowed from their censers. Shenouda’s body lay in a white casket in the elaborate regalia he traditionally wore to oversee services, complete with an ornate golden crown.

Many in the congregation broke down in tears, while others frantically waved goodbye as the Mass came to a close. Clerics, deacons and laypeople gathered around the casket, kissing it, standing in silence or bowing in respect.

Shenouda died Saturday at age 88 after serving for four decades as head of the Coptic Orthodox Church, one of the world’s oldest Christian denominations. Most of Egypt’s Christians are Orthodox Copts.

“I know he is now in a better place, but it is difficult now he’s gone. We miss you!” said a grief-stricken Marianne Saad as she stood with the thousands who followed the Mass outside the cathedral, carrying portraits of Shenouda and crosses. Many of them wept, wiping tears from their faces as the melancholic tunes of the hymns reached them through loudspeakers.

“He will always be in our hearts,” said a young Christian man, Hani Suleiman.

The grief and anxiety traveled with the pope to the desert monastery of St. Bishoy northwest of Cairo, where he was buried in a white marble grave in the evening. Thousands of the faithful camped outside the monastery from the small morning hours to catch a glimpse of his casket.

Chaotic scenes erupted when a convoy of cars accompanying an ambulance carrying Shenouda’s body arrived at the monastery before sunset. Military policemen struggled to control thousands of mourners who tried to push their way to the ambulance. Many in the crowd outside the monastery’s walls tried to get inside when the convoy arrived, but soldiers kept them out.

Nearly an hour later, Shenouda’s body was interred with a cross over it and covered with white flowers. Monks and laymen filled the burial chamber, and some of them ripped flowers off the cross to keep as souvenirs. Some used their cellular phone cameras to snap pictures or record the event in video.

The monastery, which dates back to the 4th century, was a favorite of Shenouda’s. He spent more than three years of exile there after he was banished in 1981 by then-President Anwar Sadat, who claimed the patriarch was fomenting sectarian strife. Sadat’s successor, Mubarak, released the pope in 1985.

“He was our safety valve,” said a woman in her 40s who refused to give her name. “We went to sleep every night knowing that he has our back. Now, I don’t know who can give us this again.”

Shenouda’s death, as the case has consistently been when Christians are in a crisis, has triggered a wave of sympathy by Muslims wishing to share the grief with their compatriots over the loss of a man who was at the helm of one of the world’s most ancient churches.

From military leader Hussein Tantawi — who declared a nationwide state of mourning on Tuesday — to parliament speaker Saad el-Katatni, Cabinet ministers and lawmakers, almost everyone who matters in Egypt was quoted by the media as saying something positive and warm about the pope and the magnitude of his loss to the nation.

“In general, I felt a great deal of genuine passion and sadness by Muslims,” said Mamdouh Nakhla, a Christian who heads a private rights group, al-Kalimah. “But there has always been something not quite right between Muslims and Christians in Egypt. That something has doubled or tripled with the rise of Islamists.”

The Muslim Brotherhood, the nation’s largest political group, and the ultraconservative Salafis won over 70 percent of parliament’s seats between them in recent elections, giving them the kind of power that is likely to impact one way or another on the nation’s 10 million Christians.

The Brotherhood’s trademark pragmatism would likely help find an accommodation for the Christians in the country’s new order, if only because the group fears a backlash in the West, particularly the United States, if it mistreats the Christians.

However, the Salafis, with 25 percent of the legislature’s seats, are not given to such diplomacy, with some of them saying they abide by a strict interpretation of Islamic teachings that forces Christians to pay a special tax to live in Muslim nations.

On Monday, el-Katatni asked lawmakers to stand and observe a minute of silence to mark Shenouda’s death. Most Salafi lawmakers rushed out of the chamber, while the handful who stayed behind remained seated.

“Sharia laws allow us to offer condolences, but this is it,” said Nader Bakar, a spokesman for al-Nour party, the main Salafi group. “That’s all I am going to say because whatever else I say will be misinterpreted.”

During his years as patriarch, Shenouda strove to ensure his place among the main players in this mainly Muslim nation, pressing demands behind the scenes while keeping Christian anger over violence and discrimination in check. It was a delicate balancing act.

Egyptian authorities deny any discrimination, but Christians say it happens in numerous and subtle ways. Christians, for example, rarely receive leadership jobs on the police force, particularly the security agencies. The Islamist-dominated parliament only has a handful of Christians, and there are never more than one or two Christians among 30-plus Cabinet ministers.

The pope, accustomed to the monastic traditions of Egypt’s unforgiving desert, had on occasion protested what he perceived to be gross injustices to his flock by living in seclusion for days or even weeks in remote monasteries.

“When he got upset and angry, he left the world behind and returned to his cave, where he spoke to no one for days except his secretaries,” said Father Wissa, one of the estimated 170 monks in St. Bishoy monastery, a cluster of mudbrick structures.