Gunmen killed three policemen on Monday night at Cairo's Al-Azhar University, security sources said, a week before a presidential election former army chief Abdel Fattah al-Sisi is expected to win.
The assailants stepped out of two cars and opened fire on a security checkpoint just outside the university, also wounding 11 people, the sources said.
Militants have stepped up attacks on security forces since Sisi toppled Islamist President Mohamed Mursi last year.
Hundreds of police and soldiers have been killed in the Islamist insurgency against the army-backed government.
In an interview with Reuters last week, Sisi said Egypt needed support from the United States in its battle against Islamist militants who pose a threat from several areas, including the Sinai Peninsula and the border with Libya.
Security forces have devastated the Muslim Brotherhood since Mursi's fall after mass protests against his rule, killing hundreds in the streets and arresting thousands.
But containing hardline Islamists who stage shootings and bombings is proving far more difficult.
(Writing by Michael Georgy; Editing by Bernard Orr)