An interior ministry statement confirmed the incident and said some of the "terrorist" attackers had died, without giving any figures for casualties or further details.
The small extremist group Hasm claimed the attack, saying in a statement that 28 members of the security forces were killed, with 32 injured.
Since the army removed President Mohamed Morsi, of the Muslim Brotherhood, extremist groups have increased their attacks on the country's military and police.
Authorities have been fighting the Egyptian branch of the jihadist group Islamic State, which has increased its attacks in the north of the Sinai peninsula.
Hundreds of soldiers and police have been killed in the attacks.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
Hasm has claimed multiple attacks since 2016 on police, officials and judges in Cairo.
In their statements, the groups do not claim any affiliation to the Muslim Brotherhood.
