The figure from the interior ministry is lower than a toll given earlier by security and medical sources who had said more than 50 Egyptian security personnel had been killed in the clashes which began on Friday night.
Sixteen Egyptian policemen were killed in a shootout with militants on the road between Cairo and the Bahariya oasis in the country's Western Desert, according to an official toll released Saturday.
The figure from the interior ministry is lower than a toll given earlier by security and medical sources of at least 35 Egyptian police officers killed in the clashes which began on Friday night.
Security officials had earlier reported the death toll at more than 50, adding the casualties included 20 officers and 34 conscripts.
The officials said that the exchange of fire, during a raid on a militant hideout, took place late Friday in the al-Wahat al-Bahriya area in Giza province, about 135km from the capital.
The officials said the revised death toll, earlier put to 35, could increase.
They spoke on the condition of anonymity because they were not authorised to speak to the media.
Earlier on Friday, security sources said that the armed militants killed at least 35 policemen in the shootout in the Western desert.
Insurgency in the desert
Egypt is facing an insurgency concentrated in the Sinai peninsula from two main groups, including a Daesh affiliate, that has killed hundreds of security forces since 2013.
The security sources said authorities were following a lead to a hideout deep in the desert thought to house eight suspected members of Hasm - a group which has claimed several attacks around the capital targeting judges and police since last year.
A convoy of four SUVs and one interior ministry vehicle was ambushed from higher ground by militants firing rocket-propelled grenades and detonating explosive devices, a senior source in the Giza Security Office said.
Two security sources said eight security personnel were injured in the clashes, while another source said that four of the injured were police and four others suspected militants.
Muslim Brotherhood targeted
Egypt accuses Hasm of being the militant wing of the Muslim Brotherhood, a group it outlawed in 2013.
The Muslim Brotherhood denies this.
The insurgency in the Sinai peninsula has grown since the military ousted President Mohamed Morsi of the Muslim Brotherhood in mid-2013 following mass protests against his rule.
The militant group staging the insurgency pledged allegiance to Daesh in 2014. It is blamed for the killing of hundreds of soldiers and policemen and has started to target other areas, including Egypt's Christian Copts.