Cairo: Egyptian has declared state emergency following bombings by ISIS in two churches killed at least 44 people on Palm Sunday.

The attacks took place on April 9 at Tanta and Alexandria, cities in the Nile Delta. They occurred weeks ahead of Pope Francis’ intended visit to show support for Egypt’s Christian minority.

Earlier in December, a church was bombed in Cairo, the national capital.

Immediately after the twin blasts on Palm Sunday, Egyptian President Abdel Fattah declared the “three-month” state of emergency and warned that the country’s war against the terrorists “will be long and painful.”

The first bombing at the Mar Girgis Church in Tanta city north of Cairo killed 27 people, the health ministry said.

Another blast rocked Saint Mark’s Church in Alexandria where Coptic Pope Tawadros II had been leading a Palm Sunday service. At least 17 people, including four police officers, were killed in the second attack. The interior ministry said Tawadros was unharmed, and a church official said he left before the explosion.

The ministry also said a suicide bomber blew himself up when prevented from entering the church.

Eyewitnesses said a police officer detected the bomber before he blew himself up.

At least 78 people were wounded in Tanta and 40 in Alexandria, the health ministry said.

Pope Francis sent his “deep condolences” to Tawadros.

ISIS in a statement published on social media claimed two Egyptian suicide bombers carried out both attacks and threatened further attacks.

Worshippers had been celebrating Palm Sunday, one of the holiest days in the Christian calendar, marking Jesus’s triumphant entrance to Jerusalem.

Egypt had been ruled under emergency law, which allows police expanded powers of arrest and surveillance, for decades before 2012.

Pope Francis, who is due in Cairo on April 28-29, offered prayers for the victims.

“Let us pray for the victims of the attack unfortunately carried out today,” he said.

“May the Lord convert the heart of those who sow terror, violence and death and also the heart of those who make weapons and trade in them.”

Copts, who make up about one tenth of Egypt’s population of more than 92 million and who celebrate Easter next weekend, have been targeted by several attacks in recent months.

Jihadists and Islamists accuse Copts of supporting the military overthrow of Islamist president Mohamed Morsi in 2013, which ushered in a deadly crackdown on his supporters.