CAIRO (Reuters) - Islamic State claimed responsibility on Tuesday for a suicide bombing at Cairo's main Coptic cathedral on Sunday that killed at least 25 people.

The militant group said in a statement carried by its news agency Amaq that a suicide bomber whom it identified as Abu Abdallah al-Masri had detonated his explosive belt inside the church.

"Every infidel and apostate in Egypt and everywhere should know that our war ... continues," it said.

The Interior Ministry identified the bomber on Monday as 22-year-old student Mahmoud Shafik Mohammed Mostafa, and said he was a supporter of the banned Muslim Brotherhood political movement who had joined a militant cell while on the run from police.

In an interview with Reuters, Mostafa's mother said he had been sexually abused in police custody in 2014, but that she had seen no sign that he had been radicalised.

In addition to the dead, at least 49 people were wounded when the bomb went off in a chapel adjoining St Mark's Cathedral, Cairo's largest church and seat of the Coptic Christian papacy.

President Abdel Fattah al-Sisi said four people had been detained and two were on the run.

PREVIOUS ARREST

Sisi took power in 2013, deposing the Brotherhood's Mohamed Mursi, and has since outlawed the Islamist movement as part of a crackdown in which hundreds of its supporters have been killed and thousands jailed.

The Interior Ministry said Mahmoud had been arrested in March 2014 for carrying arms during a protest, and freed on bail after two months. It said he had joined a cell led by Mohab Mostafa Sayyed Qassem, a militant with links to Islamic State fighters in Northern Sinai and exiled Brotherhood officials in Qatar, and was wanted in two other cases.

His mother, Umm Bilal, said Mahmoud had fled to Sudan shortly after being released.

A man cries during the funeral of victims killed in the bombing of Cairo's Coptic cathedral, at the Mokattam Cemetery in Cairo, Egypt December 12, 2016.Amr Abdallah Dalsh

"Mahmoud would not do this ... he would not kill anyone," she shouted as she listened to a news report on the bombing.

She said Mahmoud's father had died two years ago, and that Mahmoud called her regularly from abroad, most recently about a week ago.

"He said he would not return because security forces would detain him again ... He was asking after me and his sisters ... I didn't notice any change in his voice or anything to suggest he would blow himself up."

"HE CRIED ALL NIGHT"

Slideshow (5 Images)

Umm Bilal, who wore an Islamic face-covering or niqab, said her son had returned broken from police custody, and had confided in his brother that he had been sexually assaulted.

"He kept crying all night ... He wasn't crying because he was beaten or tortured, though the scars were still visible on his face and body," she said. "I believe they broke him at the station, they violated his honour."

But she said Mahmoud had not been radicalised.

She said his two brothers had also been arrested, one of them after the bombing.

The Muslim Brotherhood won Egypt's first free elections after the 2011 uprising that ended Hosni Mubarak's 30-year rule. Mursi became president, but was toppled two years later after mass protests.

Egypt's oldest Islamist organisation says it is peaceful, but has split into rival wings since the crackdown, while some erstwhile supporters have formed splinter groups that have carried out attacks on police and judicial officials.

Disillusioned by its ill-fated flirtation with democracy, some younger Brotherhood supporters have gone to fight in Syria or joined the local arm of Islamic State, Sinai Province.

Since 2013, the group has killed hundreds of soldiers and police in the Sinai Peninsula, and it has started to attack Western targets within Egypt. The army has responded with air strikes and by bulldozing entire villages.