Egypt's President Abdel Fattah el-Sisi has warned that Egypt faces a threat to its existence from what he called "terrorists", blaming "foreign-funded operation" for the deadly attacks that killed 31 soldiers in the Sinai Peninsula.

In a thundering speech ahead of the funeral for the slain troops on Saturday, Sissi said there are foreign powers that want to "break the back of Egypt," without elaborating.

He vowed to take drastic measures to uproot the armed groups, and said Egypt is engaged in an "extensive war" that will last a long time.

"There is a big conspiracy against us," he said, a day after the deadliest attack on the Egyptian military in years.

A group of armed men launched a complex assault on the checkpoint that involved a car bomb possibly detonated by a suicide attacker, rocket-propelled grenades and roadside bombs placed to target rescuers.

Following the attack, Sisi declared a state of emergency and imposed a 5pm to 7am curfew in the restive northern part of the peninsula.

No one has claimed responsibility for the attacks, but it bore the hallmarks of the extremist group Ansar Beit al-Maqdis, which has carried out several attacks on security forces since the military overthrew President Mohamed Morsi in 2013.

'Treacherous coup'

The government has blamed much of the violence on Morsi's Muslim Brotherhood, which it blacklisted as a "terrorist group" last year.

The Brotherhood, which renounced violence decades ago, has condemned the attacks and denied any involvement.

A Brotherhood alliance issued a statement on Friday offering sincere condolences to the "families of the martyrs and victims of the treacherous coup".

It said the soldiers were killed in a "new massacre added to the black record of the military junta that has thrown the army into the political arena and put the Sinai under siege, isolation and schemes of displacement".

Armed groups have been battling security forces in Sinai for a decade, but the violence spiked after Morsi's overthrow, spreading to other parts of the country.

The armed groups have portrayed the attacks as retaliation for a sweeping crackdown by security forces, in which hundreds of Morsi supporters have been killed in street clashes and some 20,000 people have been arrested.

On Saturday, Sisi called on Egyptians "to be aware of what is being hatched against us" and to be "vigilant and steadfast with the army and the police".

"All that is happening to us is known to us and we expected it and talked about it before July 3," he said, referring to the day last year when he overthrew Morsi. At the time Sissi was defence minister and army chief.