CAIRO - Gunmen in a car shot dead an Egyptian army brigadier general and wounded two soldiers in eastern Cairo on Friday, the military said.

The attack came hours ahead of planned Islamist protests that have prompted the police and military to boost their presence in the capital and other cities. The identity of the assailants was not clear, but militants have killed scores of policemen and soldiers since the army overthrew Islamist president Mohamed Morsi in July last year.

The military said in a statement that the assailants were driving a vehicle without licence plates. Security officials had earlier said the officer was a colonel. Several high-ranking police and military officers have been killed in attacks since Morsi’s overthrow. Morsi’s ouster and detention led to a massive crackdown on his supporters that killed hundreds of people and saw thousands jailed.

Meanwhile, two people were killed on Friday when Islamist protesters and police clashed in Cairo just hours after unidentified attackers shot dead a senior army officer in the Egyptian capital.

The army and police had fanned out across Cairo and other cities in anticipation of rallies called by an Islamist group that opposes the military’s overthrow of president Mohamed Morsi last year.

The assailants fled and were not identified, but protests by Islamists are increasingly giving way to armed attacks amid a deadly security crackdown that has killed hundreds of people and left thousands in jail. The murder came as police rounded up at least 145 people they said were planning acts of violence during the protests. In Cairo’s working class district of Matariya, at least two people were killed when protesters clashed with police, health and security officials said. A health ministry official said one had been shot in the chest.

A friend identified him as Mohammed Hassan, and told AFP the dead man was an Islamist who had regularly attended anti-government demonstrations. “The police fired randomly at the protesters,” he said. However, the interior ministry said police came under fire from the protesters, and officers arrested one of them carrying a shotgun. Smaller marches, quickly dispersed by police, were reported elsewhere. In Cairo’s Haram district, only about 20 protesters turned up and fled at the sight of police. Officers frogmarched one suspected demonstrator left behind to a waiting police car.

The protests were called by the little-known Salafi Front, part of a loose network of Islamists who oppose the army’s overthrow of the Islamist Morsi in July 2013. The interior ministry said in a statement that police experts had defused eight rudimentary bombs across the country. Islamists, particularly Morsi’s Muslim Brotherhood movement, were the strongest political bloc in Egypt before the military toppled him, following mass demonstrations demanding his resignation.

Morsi’s ouster unleashed a deadly crackdown on his supporters that has killed hundreds. Thousands have also been arrested and jailed. The Muslim Brotherhood has also been blacklisted as a terrorist group, making mere membership of the 86-year-old organisation punishable by a prison sentence. Abdel Fattah al-Sisi, the former army chief who toppled Morsi and won a presidential election earlier this year, has pledged to eradicate the group.

The Brotherhood insists it is peaceful, but the crackdown that has caused it to go underground is believed to have radicalised some of its members. The deadliest attacks on security forces have been claimed by the militant Ansar Beit al-Maqdis group that is spearheading an insurgency in the Sinai Peninsula.

The group has killed scores of policemen and soldiers and recently pledged allegiance to the Islamic State group that controls parts of Iraq and Syria. After an October ambush killed more than 30 soldiers, the government declared a state of emergency in part of Sinai and razed hundreds of homes to create a buffer zone along the border with neighbouring Gaza.