Cairo: Gunmen travelling in a car opened fire on Tuesday on a group of Egyptian policemen outside 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.

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.

In April, a court in Minya triggered an international outcry after sentencing to death around 700 Morsi supporters after a speedy mass trial, accusing them of murder and attempted murder of policemen in August last year in Minya.

In a separate attack, militants blew up a gas pipeline late Monday near Al-Arish airport in northern Sinai, security officials said.

The targeted pipeline transports gas to an industrial area in central Sinai, they added.

Militants have regularly targeted pipelines in Sinai since the ouster of president Hosni Mubarak in 2011, repeatedly forcing a halt in gas supplies to Israel and Jordan.

The army has poured troops into the mountainous and underdeveloped region of Sinai Peninsula to combat a growing militancy.

Officials say about 500 people, mostly members of security forces, have been killed in militant attacks across the country since the ouster of Morsi.