Gunmen travelling in a car opened fire on Tuesday on a group of Egyptian policemen near Cairo's Al-Azhar university, killing three and wounding nine others, the interior ministry said.
The attack comes just days ahead of a presidential election on May 26-27, which former army chief Abdel Fattah al-Sisi is expected to win.
The number of attacks targeting policemen has risen since Sisi ousted Islamist president Mohamed Morsi in July last year.
Signup to our newsletter and follow us on Facebook and Twitter!
The latest came as some students of Cairo's Al-Azhar university, a prestigious seat of Sunni Islamic teaching, were protesting in favour of Morsi, the ministry said in a statement.
The wounded included an officer, the ministry added.
The attack also came a day after two policemen, riding on a motorbike, were shot dead by gunmen in the central city of Minya.