Egypt was rocked at noon on Friday by a coordinated assault by gunmen on a mosque in the Sinai Peninsula, in what has proved to be the deadliest terrorist attack in the country’s modern history.

Gunmen opened fire on worshippers during Friday noon prayers – the most important period of observance for Muslims, during which mosques are usually crowded – killing 235 people and injuring 109 others.

During the noon sermon, four off-road vehicles carrying armed men arrived at the al-Rawdah mosque in Bir al-Abed, a small village 40km west of North Sinai’s main city Al-Arish.

Militants opened fire from the vehicles and, according to survivors, gunned down any people who tried to flee the building. They also blocked off escape routes from the area by blowing up cars and leaving the burning wrecks blocking the roads, three police officers on the scene said.

The Egyptian authorities declared an immediate counterattack. “Egypt’s air force is following the trail of the terrorists and has destroyed two or three of their vehicles,” a military source told The Independent. He could not give more details about the attack itself, as it was not directed at the military.

But the mosque in question is known as a place where Sufis, followers of a mystical strand in Islam, come to pray. Radical Islamist militants consider Sufism to be a form of sorcery, forbidden in Islam.

Responsibility for the attack has not yet been claimed by any group, but since 2011 North Sinai has been the site of an ongoing insurgency by jihadists, who since 2014 have been aligned with Isis. The group is responsible for near-weekly attacks on the army and police in Sinai, and claimed responsibility in 2015 for downing a plane leaving the Sharm El-Sheikh beach resort, killing all the mostly Russian tourists on board.

“Almost every sign points toward Isis in Sinai” being behind Friday’s mosque attack, Mohannad Sabry, a Sinai expert and author of Sinai: Egypt’s Linchpin, Gaza’s Lifeline, Israel’s Nightmare, told The Independent. “They have had a decades-old lethal animosity with the Sufi community in Sinai and have killed several of their most revered clerics over the past years.”

The Isis branch in Sinai, which calls itself “Sinai State”, claimed responsibility for the beheading of two Sufi sheikhs in December 2016, accusing them of apostasy and sorcery, and threatened that it would not allow the presence of Sufi orders in Sinai or Egypt. The group has also frequently destroyed Sufi shrines in North Sinai.

A Sinai resident who did not want to be named told The Independent that in general there has been a change in how locals perceive Sufis in recent years. “It’s not really sectarianism but more like ‘us versus the other’, which was not common among Bedouins.”

The military source also believed Isis was behind the attack. “They attack everyone, Christians, Muslims, the military,” he said. He suggested the attack could indicate a change of tactics, as this is the first such large-scale assault directly targeting civilians in the region. “They did kills civilians, but not at this scale,” he said.

“It is certainly a unique and unprecedented attack,” Mr Sabry said, adding that it sends “a loud message to the North Sinai community that even a Muslim house of worship, as long as it doesn’t pledge allegiance to Isis, is a target.”

Mr Sabry sees another reason for Isis to attack Sufis. “The Sufi community in North Sinai has definitely succeeded in what billions of dollars and hundreds of lives spent by Egypt’s military could not achieve,” he said. “It powerfully kept thousands of youths away from joining the ranks of Isis and has continued to fight them on social, intellectual and most importantly religious levels.”

Egyptian President Abdel Fattah Al-Sisi announced a three-day mourning in response to the attack. “Terrorists want to demoralise us and spread doubt about our capacities, but this attack only unites us and makes us more persistent,” he said in a live address on national television. “The army and the police will take revenge for the people and will recover security in the area soon.”

Other countries offered their condolences to Egypt, with British Prime Minister Theresa May calling it an “evil and cowardly act” and the French foreign minister, Jean-Yves Le Drian, condemning the attack and saying Paris stood with its ally.

US President Donald Trump denounced what he called a “horrible and cowardly terrorist attack on innocent and defenceless worshippers in Egypt".

“The world cannot tolerate terrorism,” he said on Twitter, “we must defeat them militarily and discredit the extremist ideology that forms the basis of their existence.”

Yet despite successive army campaigns and after years of unrest, the mosque attack served as a dark reminder that the violence in Sinai is not decreasing, and Isis has not been weakened.

“Once again it casts major doubt on the claims of success and achievements spread so loudly by Sisi’s regime and the Egyptian military,” Mr Sabry said. “This attack hit a geographic area the military claims is under control, proving that Isis is still maintaining some of its capabilities to mobilise weapons, explosives and fighters despite years of war with one of the biggest and strongest military forces in the Middle East.”