Gunmen ambushed an Egyptian security checkpoint, opening fire on a car and killing five policemen in an area just south of the capital, the state-run MENA news agency and the interior ministry said.
Three gunmen on a motorbike attacked police in al-Badrasheen area of Giza province, 30km south of Cairo, killing two officers and three conscripts, the agency said on Friday, citing a security source.
"A police officer who was near the site of the attack exchanged fire with the assailants, forcing them to flee," the ministry statement said.
Attackers stole the weapons and radios of the victims and tried to set fire to the bodies but fled when they saw people gathering nearby, witnesses said.
No group immediately claimed responsibility for the attack but Egyptian security forces have been battling the local affiliate of the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) in the northern Sinai area and attacks have spread to other parts of Egypt.
Hundreds of soldiers and police have been killed since 2013 in the Sinai Peninsula. At least 23 soldiers were killed last week when suicide car bombs hit two checkpoints in the region in an attack claimed by ISIL.
It was one of the bloodiest assaults on security forces in years.
ISIL has also intensified attacks in other areas, often targeting Coptic Christians. About 100 Copts have been killed since December.
In May gunmen assault on a group of Copts in a bus travelling to a monastery, killing 29 people and two bombings of churches killed more than 40 people a month earlier.
Church sources on Thursday said Egyptian Coptic Orthodox Christians and the Egyptian Catholic church have been told by church leaders to cancel all events, camps and activities outside churches in July because of a security threat.
Source: News agencies