Three Egyptian policemen were killed at Cairo's al-Azhar University on Monday night, the Interior Ministry said, according to Al Jazeera.
The attack comes a week before the presidential election that former army chief Abdel Fattah el-Sisi is expected to win.
According to security sources, assailants stepped out of two cars and opened fire on a security checkpoint just outside the university.
Nine people were also wounded in the attack, the ministry said. It said the shooting happened as students were protesting in favor of former President Mohammed Morsi, who was toppled by the army after mass protests against his rule last summer.
Al-Azhar is Sunni Islam's highest seat of learning and has been the scene of frequent anti-government protests since Morsi’s ouster.
Armed groups have also stepped up attacks on security forces since Morsi's overthrow, killing hundreds of police and soldiers.
In a previous attack on Saturday, a bomb wounded three people at a Cairo election rally for Sisi.
Many of the attacks in Egypt have been claimed by the Al-Qaeda-inspired Ansar Bayt al-Maqdis, 200 members of which were charged last week with carrying out over 50 terrorist attacks.
Egypt’s interim government says there is a direct link between the Muslim Brotherhood, of which Morsi is a member, and Ansar Bayt al-Maqdis, and on this basis blacklisted the Brotherhood as a terror organization.
The Brotherhood denies having any connection to terrorism.