Egypt faces a long and difficult battle with militants, the country's president has said, in his first remarks since a deadly attack in the Sinai region.
Abdul Fatah al-Sisi spoke a day after a group linked to Islamic State said it killed at least 32 soldiers and police.
"This battle will be difficult, strong, evil and will take a long time," he said in comments broadcast on state TV.
Mr Sisi cut short a visit to an African Union summit to return to Egypt in the wake of the Sinai attack.
On Saturday morning he chaired a meeting of the country's Supreme Council of the Armed Forces (Scaf).
Reports say he ended the meeting by issuing a presidential decree to form a new military command for Sinai with the aim of tackling the growing militant threat.
In his speech, made after meeting military chiefs and broadcast on national TV, Mr Sisi insisted the militant threat was a danger not just to Egypt but to the wider Middle East.
"It will take a long time and all Egyptians will be paying the price, because soldiers are your sons, police officers are your sons. They are Egypt's sons.
"But they are willing to pay the price - for this country. And not only for this country, but for the whole region."
Militants targeted military and police in North Sinai late on Thursday, with least 32 and wounded many more.
The group Sinai Province, which has pledged allegiance to Islamic State (IS), said it carried out the attacks.
Egypt has conducted a major security crackdown in Sinai in recent months.
Despite that, Thursday's attacks represent some of the worst anti-government violence in Egypt for months, and indicate a previously unseen level of co-ordination by militants, correspondents and analysts say.
Separately, an Egyptian court on Saturday banned the armed wing of Palestinian group Hamas and listed it as a terrorist organisation.
Egyptian officials routinely allege that weapons are smuggled from Hamas-dominated Gaza to supply militants in northern Sinai.
Sinai has become increasingly lawless since President Hosni Mubarak was overthrown in 2011, and insurgents have intensified attacks since his Islamist successor Mohammed Morsi was ousted in 2013.
North Sinai has been under a state of emergency and a curfew since October, when an attack on a checkpoint killed dozens of soldiers.
Major military operations in the region have so far failed to quell the violence.
Recent Sinai attacks
- January 2015: At least 32 soldiers and police killed in attacks around El-Arish
- Oct 2014: At least 31 soldiers killed in suicide bombing and shooting in and around El-Arish
- Sept 2014: Bomb attack near Gaza border kills at least 11 policemen