Militants fired rocket-propelled grenades at two buses packed with Egyptian policemen in Sinai, killing 24 in the deadliest attack of its kind in years, medical and security sources said.

At least two others were injured when the unknown militants fired on the buses as they headed towards the town of Rafah on the border with the Palestinian Gaza Strip, on Monday.

The attack was the deadliest in the Sinai in years, exceeding the toll from an August 2012 attack on Egyptian soldiers that killed 16.

The security situation in the Sinai Peninsula, which borders both Gaza and Israel, has deteriorated since 2011, when president Hosni Mubarak was overthrown.

But it has become significantly worse since the army ousted president Mohamed Morsi on July 3, with near daily attacks by militants targeting police and military installations.

According to an AFP tally, at least 49 security officials have been killed in Sinai since July 5th — 28 police and 21 soldiers — not including those in the latest attack.

Egypt has deployed additional forces to Sinai, which is mostly desert and inhabited by Bedouin tribes that have been accused of cooperating with Islamist militants.

The army says it has killed nearly 70 “terrorists” in the region since July 3.

The violence comes as Egypt wrestles with a deep political crisis and bloodshed that has left hundreds of people dead in days of clashes between Islamist protesters and security forces.