Egyptian President Abdul Fattah al-Sisi says the country is facing a threat to its existence from jihadists after the military suffered the biggest loss of life in decades in attacks in Sinai.
At least 31 soldiers were killed in two attacks on Friday, the deadliest a bomb blast near the town of El-Arish.
A three-month state of emergency has been declared in parts of the Sinai Peninsula and Egypt's Rafah crossing into the Gaza Strip was closed.
There will be three days of mourning.
In a live TV address, Mr Sisi said a huge plot was being waged against Egypt "by external forces".
"This is meant to break up Egypt and the Egyptians .... Egypt is fighting a war of existence."
No group has said it carried out the attacks, which came as the army continued an offensive against jihadists in northern Sinai.
The area has become increasingly lawless since President Hosni Mubarak was overthrown in 2011.
Militants have stepped up attacks since Islamist President Mohammed Morsi was ousted by the army last year amid massive opposition protests.
In the deadliest attack, 28 soldiers were killed and a similar number injured in a suicide bomb blast at a checkpoint near El-Arish, the main town in the north of the restive peninsula.
Three more soldiers died in a separate shooting at a checkpoint in the town itself.
The state of emergency, which began at 03:00 GMT on Saturday, centres on the north and centre of the peninsula, a presidential statement said.
The decision was made after Mr Sisi called a meeting of the National Defence Council to discuss the security situation.
"The army and the police will take all necessary measures to tackle the dangers of terrorism and its financing, to preserve the security of the region... and protect the lives of citizens," the statement said.
Egypt is in mourning with state television carrying black ribbons on screen, after the latest heavy losses in the lawless Sinai peninsula, says the BBC's Orla Guerin in Cairo.
Communications have been cut, and helicopters and special forces are now searching for militant hideouts, she adds.
In their continuing offensive in northern Sinai, security forces have recently killed and captured dozens of suspected members of jihadist groups.
In September at least 11 policemen were killed in a bomb attack on a convoy in the peninsula as it travelled through the village of Wefaq, near the Gaza border.
That bombing was claimed by Ansar Beit al-Maqdis, the most active militant group in Egypt. It attempted to kill the interior minister in Cairo in 2013 in a car bomb attack and has issued videos of the beheading of captives.
The group professes backing for Islamic State (IS) group jihadists in Iraq and Syria, although it has not formally pledged its support.