A state of emergency came into force Saturday across much of Egypt's Sinai Peninsula after 30 soldiers were killed in a suicide car bombing by suspected militants.

It was the deadliest attack on the country's security forces since the army deposed Islamist president Mohamed Morsi last year, to the fury of his supporters.

The state of emergency in the north and centre of the Sinai will remain in place for three months, the president's office said.

A curfew is in force from 5pm to 7am.

Egypt also announced it would close the Rafah crossing into the Gaza Strip, the only route into the Palestinian territory not controlled by Israel.

"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 presidential decree said.

President Abdel Fattah al-Sisi, the army chief who toppled Morsi and later won elections, chaired a meeting Saturday of the Supreme Council of the Armed Forces to discuss what measures to implement under the state of emergency.

After the meeting, Sisi told reporters that Friday's attack was carried out with "external support" in order to "break the will of the Egyptian people and army".

Security officials said a suspected militant rammed a checkpoint with an explosives-packed vehicle.

The attack in an agricultural area of El-Arish, the main town in north Sinai, also wounded 29 troops, medics said, including a senior army official and five officers.

Gunmen also shot dead an officer and wounded two soldiers on Friday at another checkpoint south of El-Arish, security officials said.

Militants in the peninsula have killed scores of policemen and soldiers since Morsi's overthrow to avenge a bloody police crackdown on his supporters.



'Tourism hit'

The attacks have dealt a further blow to a tourism industry already reeling after a 2011 uprising that overthrew long-time president Hosni Mubarak.

While south Sinai is dotted with tourist resorts on the Red Sea -- a popular destination for scuba divers -- the lawless north is a base for militants who have launched a wave of attacks, mostly targeting security forces.

The peninsula's southern coastline has been largely spared from the violence rocking the country since the 2011 revolt, partly thanks to security checkpoints in the region.

But it has not been completely untouched by the militants.

In February, a suicide bomber killed three South Korean tourists in an attack on a bus in the south Sinai resort of Taba that was claimed by Ansar Beit al-Maqdis, the most active militant group in Egypt.

After Friday's attack, Sisi announced three days of national mourning.

International condemnation

The European Union and United States both denounced the latest attack.

"A prosperous and dynamic Egypt requires an environment of security and stability," the State Department said.

It was the latest in a string of bloody attacks against security forces in Egypt.

In August 2013, just weeks after the army ousted Morsi, 25 soldiers were killed in the Sinai when gunmen opened fire at two buses transporting troops with automatic rifles and rocket launchers.

In July this year, 22 border guards were killed in the western desert near the border with Libya.

From the desert and mountainous Sinai, which borders the Gaza Strip and Israel, the attacks have also extended to the capital and the Nile Delta to the north.

Ansar Beit al-Maqdis tried to assassinate the interior minister in Cairo last year with a car bomb.

The group has expressed support for Islamic State (IS) group militants in Iraq and Syria, although it has not formally pledged its allegiance.

While militants have been killed or arrested, the army has been unable so far to crush them despite a massive operation in which it has deployed attack helicopters and tanks.

The latest bombing came after an Egyptian military court sentenced to death seven members of Ansar Beit al-Maqdis on Tuesday for deadly attacks on the army.

Since Morsi's ouster, more than 1,400 of his supporters have been killed in a crackdown by the authorities. More than 15,000 others have been jailed, including Morsi, and over 200 sentenced to death.