Two bombs have exploded at a small telephone exchange on Cairo's outskirts, killing an 18-year-old woman and her mother, security sources said, days after a string of small bomb explosions hit the Egyptian capital's metro network.

The exchange building was still under construction, and it appeared likely that the devices that exploded had been intended for use elsewhere, security sources and a judicial source said on Saturday.

The unfinished concrete building partially collapsed in the blast.

The two women killed were the wife and daughter of a construction site guard who lived in an annex to the building in 6th of October City, a western satellite district of Cairo.

Meanwhile, gunmen killed four Egyptian soldiers near Rafah in North Sinai, state media and security sources said.

The gunmen forced the soldiers, who were returning from a holiday and dressed in civilian clothing, out of their vehicle and shot them before escaping, the state news agency MENA reported.

No group immediately claimed responsibility the attack.

Egypt has been hit by a wave of violence, mainly by armed groups based in the Sinai peninsula against security forces, since the army toppled President Mohamed Morsi of the Muslim Brotherhood last July.

On Wednesday, eight people were hurt in northern Cairo when homemade explosive devices blew up at four metro stations and a courthouse in the first attacks in Cairo since Abdel Fattah al-Sisi became president earlier this month.