CAIRO (Reuters) - Egyptian President Abdel Fattah al-Sisi on Wednesday ordered his military command to use all force necessary to secure the Sinai peninsula within the next three months following a militant attack on a mosque that killed more than 300 people.

Slideshow ( 2 images )

No group has claimed responsibility for Friday’s attack in which authorities say gunmen carrying an Islamic State flag opened fire after setting off an explosive. It was the worst militant attack in Egypt’s modern history.

Egyptian forces have battled an Islamic State affiliate for several years in North Sinai, where militants have killed hundreds of police and soldiers.

“It is your responsibility to secure and stabilize Sinai within the next three months,” Sisi said addressing his new chief of staff in a speech that gave no details on any operations. “You can use all brute force necessary.”

Islamic State’s Wilayat Sinai branch has claimed some of the most deadly attacks in Egypt. The group was made up in 2014 of former fighters of a local jihadist group and has staged raids on the security forces for more than three years.

Sinai has become one of Islamic State’s last holdouts after military defeats in Iraq and Syria.

Clearing militants from North Sinai, a desert area stretching from the Suez Canal eastwards to the Gaza Strip and Israel, has been a difficult task for Egypt’s army, which is more used to conventional warfare than counter-insurgency.

The military has carried out air strikes and bulldozed homes to clear an area near the Gaza border to destroy tunnels. Some tribal leaders say the campaign alienates local communities and has in the past fueled sympathy for militants.

The Arab League plans to hold an emergency meeting on Dec. 5 to discuss the attack, MENA state news agency said on Wednesday.

Tribal leaders in the Sinai, some of whom cooperate with the military to provide intelligence, say militants are as few as 800. Most are local Egyptians but there are also some Palestinians, they say.

Egypt hopes a recent agreement it helped broker between Palestine rivals factions Hamas and Fatah to allow a unity government to control the Gaza border will help stem arms smuggling by tightening control on the crossing and tunnels into Egyptian territory.

Friday’s attack was a shift for Sinai militants who have mostly focused on targeting police and soldiers on the peninsula. But since December 2016 they have begun hitting Coptic Christian churches and pilgrims on the mainland.