President Abdel Fattah al-Sisi observed a moment of silence after Saturday's explosion on the eastern edge of Cairo killed a policeman who was trying to defuse the device and wounded two others.
Security was tight as Sisi prepared to officially open the Cathedral of the Nativity of Christ in the Egypt's New Administrative Capital, 45 kilometres (28 miles) east of Cairo, ahead of Christmas mass.
Worshippers had to pass through three sets of metal detectors to access the cathedral, while armoured vehicles and dozens of ambulances were stationed nearby.
US President Donald Trump hailed the inauguration, writing on Twitter that he was "excited to see our friends in Egypt opening the biggest Cathedral in the Middle East".
"Sisi is moving his country to a more inclusive future," Trump said.
Excited to see our friends in Egypt opening the biggest Cathedral in the Middle East. President El-Sisi is moving his country to a more inclusive future!
— Donald J. Trump (@realDonaldTrump) January 6, 2019
Pope Francis extended greetings to Coptic Pope Tawadros II, saying in a video message that he "was able to give a true testimony of faith and charity, also in times of difficulties".
Coptic Christians, who account for around 10 per cent of Egypt's population, have been hit by a string of attacks by the Islamic State group in recent years.
Egypt says police kill 19 militant suspects linked to Copt attack
There was no immediate claim of responsibility for the blast on Saturday.
The bomb was hidden inside a bag that was placed on the rooftop of Al-Haq mosque near the Virgin Mary church in the Nasr City district of Cairo, religious officials and witnesses said.
The incident occurred amid heightened security around churches ahead of Coptic Christmas which is celebrated on January 7.
Massad Saad, the son of the prayer leader at Al-Haq mosque, told AFP he was inside the building when other worshippers noticed "a man going up to the roof carrying a bag" but when they followed him they found "two bags".
"We informed the police," Saad, a 35-year-old baker, said in a phone interview.
There was no immediate confirmation from officials.
Government newspaper Al-Ahram reported Sunday that a bomb had been placed in a bag on the roof of a building in Ezzbat al-Haggan, but it did not mention the church or the mosque.
On Sunday morning security forces were deployed around the neighbourhood keeping journalists at bay.
The Grand Mufti of Egypt, Shawki Allam, denounced "the terrorist operation that targeted... the church in the Ezzbat al-Haggan neighbourhood of Nasr City", on his official Facebook page.
He said "extremists" had planted "an explosive device on the roof of Al-Haq mosque... near the Virgin Mary church".
Similarly, Al-Azhar, Egypt's highest institution of Sunni Islam, condemned the attack.
7 dead in attack on bus carrying Coptic Christians in Egypt
"The targeting of worship places and killing of innocents is a flagrant criminal act that violates teachings of all religions," it said in a statement.
It also voiced its solidarity with state institutions against "terrorism" which it said sought to spoil Coptic celebrations.
Sisi often presents himself as a defender of Christians against extremists but activists and some analysts accuse the state of discriminating against them and not providing enough protection.
The president visited the Cathedral of Nativity for Christmas Eve last year when it was still under construction, and gave a short speech wishing Copts a merry Christmas and saying the country would prevail over militants.
The president on Sunday also inaugurated on Sunday Al-Fattah al-Alim mosque in the new administrative capital.
More than 100 Copts have been killed in militant attacks since December 2016.
IS claimed an assault in early November in which six Copts and one Anglican died in the central province of Minya.
The militant killed more than 40 people in twin church bombings in April 2017, and an IS gunman in December that year killed nine people in an attack on a church in a south Cairo suburb.
Hundreds of police and soldiers have also been killed in attacks.
In late December, three Vietnamese tourists and their Egyptian guide died when a roadside bomb hit their bus on the outskirts of Cairo.
The country has been under a state of emergency since April 2017.
In February the army launched a large-scale operation dubbed "Sinai 2018" to rid the Sinai Peninsula of militants after an attack on a mosque that killed more than 300 people.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ