MINYA, Egypt -- Hundreds of Egyptian Christians attended a funeral service Saturday after seven people were killed in an ambush by Islamic State militants of buses carrying pilgrims to a remote desert monastery.

The service at Prince Tadros church in the central city of Minya was held amid tight security. Minya's top cleric, Anba Makarios, led prayers over a row of six white coffins, all victims from the same family. A separate funeral was held for the seventh victim, a bus driver.

Relatives of the victims cried and held each other for support. Some rested their heads on the coffins and wept. A list of the victims' names released by the church said a 15-year-old boy and a 12-year-old girl were among the dead. Nineteen were wounded in the attack, according to the church.

Aida Shehata, who was shot in her legs, said masked men opened fire on three buses from different directions. Two of the buses were able to speed away and reach the monastery, but the militants stopped the third one and killed the driver and six of the passengers, including her husband and his brother.

"The driver tried to go to the monastery but they (the militants) were faster," Shehata told a Coptic TV network.

An Islamic State affiliate based in the restive northern Sinai Peninsula claimed the attack, calling it revenge for the imprisonment of "our chaste sisters," without elaborating.

The attack cast a shadow on one of President Abdel-Fattah el-Sissi's showpieces -- the World Youth Forum -- which opens Saturday in the Red Sea resort of Sharm el-Sheikh. The forum is drawing thousands of local and foreign youth to discuss a wide range of topics, with Egypt's 63-year-old leader taking centre stage.

In an apparent effort to keep the attack from overshadowing the start of the three-day conference, two state-owned newspapers ran front-page banner headlines about the forum. Akhbar al-Youm ran a large photo of el-Sissi cycling in Sharm el-Sheikh. Its reference to the attack lower down in the page made no mention of casualties.

ISIS has repeatedly targeted Egypt's Christians as punishment for their support of el-Sissi, who led the military's 2013 ouster of an elected but divisive Islamist president.

El-Sissi, who has made security among his top priorities since taking office in 2014, wrote on his Twitter account that Friday's attack was designed to harm the "nation's solid fabric" and pledged to continue fighting terrorism. He later offered his condolences when he spoke by telephone with Pope Tawadros II, spiritual leader of Egypt's Orthodox Christians and a close ally of the president.

Begemy Nassem Nasr, the priest of the church of St. Mary in the central Egyptian city of Minya, near where the attack took place, suggested it was meant to embarrass el-Sissi as he hosted the youth forum. "I think that this is a terrorist act which is targeting Egypt through playing the card of the Copts," he said.

Friday's attack was the second to target pilgrims heading to the St. Samuel the Confessor monastery in as many years, indicating that security measures put in place since then are inadequate. The previous attack in May 2017 left nearly 30 people dead. IS has also targeted Christian churches with a series of suicide bombings since December 2016 that have killed scores of people.

The attacks led to tighter security around Christian places of worship and Church-linked facilities, where metal detectors and armed police are routinely deployed. They have also underlined the vulnerability of minority Christians in the conservative, Muslim-majority country.

The Interior Ministry, which oversees the police, said Friday's attackers used secondary dirt roads to reach the buses carrying the pilgrims, who were near the monastery at the time of the attack. Only pilgrims have been allowed on the main road leading to the monastery since last year's attack.

Some Christians in Minya said police negligence was partly to blame for the latest attack, saying they stopped providing armed escorts for pilgrims' buses.

"They should have escorted them. They know it is dangerous to leave them alone on that road," said Youssef Attya, a 38-year-old health worker from Minya.

The Interior Ministry said police were pursuing the attackers, who fled the scene.

Egypt's Christians, who account for some 10 per cent of the country's 100 million people, have long complained of discrimination. Christian activists say the church's alliance with el-Sissi has offered the ancient community a measure of protection, but sectarian violence still flares from time to time, especially in poorer and more rural areas.

Christians make up some 35 per cent of the population in Minya, more than in any other governorate. The area has also seen the most acts of violence against Christians in recent years.

Christians there accuse the local police of going easy on Muslim assailants, saying authorities prefer to resolve disputes through reconciliation rather than arresting and prosecuting those who commit crimes.