Egypt's president has vowed to press ahead with the country's war against terrorism, secure its borders and hunt down militants, after a deadly attack on the country's police force.

President Abdel-Fattah el-Sissi's remarks on Sunday came nearly 48 hours after authorities officially announced that at least 16 policemen were killed in a brazen ambush by militants south-west of Cairo.

Security officials told The Associated Press and other media outlets that the death toll reached 54, making it one of the worst attacks against Egypt's police in years. It was not immediately possible to reconcile the conflicting reports.

Chairing a meeting attended by the country's top security officials, Mr el-Sissi said: "Egypt will continue its confrontation against terrorism and those financing and standing behind it, with strength, decisiveness and efficiency, until it's curbed."

His first remarks on the massacre came as there was confusion over the police raid gone wrong, with a lack of information, charges of incompetence and conflicting accounts by officials to media outlets.

The ambush began when security forces acting on intelligence moved against a purported militant hideout some 85 miles outside Cairo.

Backed by armoured personnel carriers and led by senior counter-terrorism officers, the police contingent drew fire and rocket-propelled grenades, according to the security officials.

What happened next has not been clarified, but many officers were killed and others injured.

The confusion around the incident sparked a debate on social media, with Egyptians divided over who to blame.

Many suggested the police force had been infiltrated by Islamists given that some security officials said the ambush was carefully planned.

Along with conflicting reports of the death toll, authorities have also denied the authenticity of audio recordings, aired by pro-government media outlets, allegedly of policemen who took part in the operation.

The speakers on the recordings can be heard pleading for help.

The interior ministry said the sources of the audio recordings are not known and that they carried "unrealistic details that have nothing to do with the reality".

It also warned against circulating such recordings and sowing confusion.

No militant group immediately claimed responsibility for the attack which took place near Egypt's vast western desert, where a previous series of attacks were blamed on Islamic militants pouring in from Libya.

Meanwhile, a local affiliate of the Islamic State group is spearheading an insurgency across the country and in the Sinai Peninsula.

Rights advocates argue that the authorities' heavy crackdown on Islamists in the aftermath of the 2013 military ousting of Islamist President Mohammed Morsi has fuelled an insurgency.

Hundreds of Islamists were killed in mass demonstrations demanding Morsi's return after he was ousted, while thousands were jailed.

In one of the latest trials involving Islamists, an Egyptian criminal court on Sunday confirmed death sentences for 11 men and handed down life sentences to 14 others over charges including the attempted murder of policemen.

The defendants can appeal against the court ruling by Judge Mohammed Nagi Shehata, who is known for his severity. Five of those sentenced to death were tried in absentia.

The suspects were referred to court in 2015, more than a year after the ousting of Mr Morsi, whose group, the Muslim Brotherhood, was outlawed and thousands of its members referred to courts over numerous charges.