The Egyptian army says an air raid killed some of the attackers involved in Friday's massacre when at least 305 people died in a bomb-and-gun attack on a mosque.

In a statement late on Friday, army spokesman Tamer Rifai said the Egyptian air force chased down the assailants who, according to officials, arrived in four 4WD vehicles and carried out the attack during noon prayers.

"The air forces chased the terrorists and discovered and destroyed a number of vehicles that were involved in carrying out the brutal terrorist attack ... Those on board were also killed," Rifai said.

The massacre occurred in Bir al-Abed, a town in North Sinai province.

The mosque - about 40km west of el-Arish, the provincial capital of North Sinai - was frequented by followers of Sufism, a more mystical form of Islam.

No group has claimed responsibility, but according to a statement on Saturday from Egypt's public prosecutor, the attackers were carrying a flag representing the Islamic State of Iraq and the Levant group (ISIL, also known as ISIS). The government declared a three-day period of mourning for the victims.

Egyptian state media MENA said 120 people were also wounded in the attack.

President Abdel Fattah el-Sisi condemned the assault, which he described as "criminal" and "cowardly" in a televised statement on Friday.

He said the attack "will not go unpunished".

"The armed forces and the police will avenge our martyrs and restore security and stability with the utmost force," Sisi said.

Egypt has for years battled an armed, anti-government campaign on the rugged and thinly populated Sinai Peninsula. The campaign has gained pace since the military overthrew democratically elected President Mohamed Morsi of the Muslim Brotherhood in mid-2013.

In 2014, following a suicide bombing that killed 33 soldiers, Sisi declared a state of emergency on the peninsula, describing it as a "nesting ground for terrorism and terrorists".

{articleGUID}

Previous attacks in Sinai mostly aimed at security forces and members of Egypt's Coptic Christian minority.

However, mosques in North Sinai's Sheikh Zuweid town have also been hit.

The Bir al-Abed mosque was an easy target because it was outside the province's main cities.

The mosque may also have been targeted because it was attended by members of the Sufi sect, who are considered infidels by armed groups such as ISIL.

In 2016, ISIL fighters released images purportedly showing the execution of a 100-year-old Sufi religious leader, whom they accused of "witchcraft".

Timothy Kaldas, a professor at Nile University in Cairo, told Al Jazeera that Friday's assault "fits the pattern of ISIS attacks".

"Potentially, it's another attack against Sufis in northern Sinai. Potentially, it's retaliation for tribes co-operating with the state in the crackdown on ISIS," he said.

Kaldas said ISIL has been "more willing to target civilians, as we saw with a lot of attacks on the Egyptian-Christian community in the past year".