Both the Islamic State and another militant group known as Revolutionary Punishment have issued competing claims of responsibility for an explosion on Tuesday that killed a group of police officers and civilians in Giza, a city just southwest of Cairo. The government, for its part, is blaming the incident on the Muslim Brotherhood.
The rival claims illustrate how the Egyptian mainland has become a hotbed of militant activity, said Mokhtar Awad, a research fellow in the program on extremism at George Washington University's Center for Cyber and Homeland Security.
"There's definitely a problem brewing underneath the surface of Cairo when it comes to extremist recruitment," he said.
According to the Egyptian government's version of events, Thursday's blast occurred while security forces were moving into an apartment that they suspected harbored militants. Initial reports said that at least six people were killed. A Giza official later said that the death toll included seven police personnel and three civilians.
"Police had information that a group of Muslim Brotherhood members were preparing to carry out aggressive acts in the coming days using explosives and crude bombs," the Interior Ministry said in a statement. "This group was using an apartment in a Cairo building, and on Thursday night the police raided this apartment where they found a number of crude bombs."
Footage of the explosion's aftermath that was broadcast by local media showed the blown-out apartment building, with debris strewn across the entire street.
On Friday, in a statement issued on social media, the Islamic State's Sinai affiliate said that the apartment was a trap that had been set by its fighters. The bomb went off as part of an elaborate plot to lure police officers into a booby-trapped apartment, according to IS, which claimed that 10 police officers had been killed. The group did not acknowledge the death of civilians.
IS particularly applauded the death of police officer Mohamed Amin, the head of the investigative unit in the neighborhood where the explosion occurred, whom the group had labeled an "apostate."
The Egyptian Interior Ministry dismissed the IS claim, insisting that the Muslim Brotherhood was responsible. It also asserted that Amin was only injured in the blast and remains alive.
Meanwhile, the Revolutionary Punishment group also claimed responsibility for the attack on social media. The group said in a statement posted to Facebook that the blast was a suicide mission, and promised that it would launch similar attacks across Egypt. The group also apologized to civilians who were affected by the explosion and promised to compensate the victims, though it offered no details in how it planned to do so.
It's not surprising that the Egyptian government would be quick to blame the Brotherhood. The group has been forced underground since the Egyptian military overthrew Mohamed Morsi, the country's democratically elected and Brotherhood-backed president, in the summer of 2013. The government then outlawed the Brotherhood and began to round up its members.
In the two years since the coup, militant groups have launched a series of attacks throughout Egypt, and the Egyptian government has consistently linked those attacks to the Brotherhood. Many of the Brotherhood's leaders who managed to escape abroad condemn the violence; senior Brotherhood figures based in Turkey distanced themselves from Thursday's explosion. But Awad explained that the group has fractured within Egypt, with some of its members taking up arms against the state.
"Operationally, the Brotherhood is not operating as a whole body within Egypt," he said.
Egypt has also faced a slow-burning insurgency in the Sinai Peninsula, where an Islamic State affiliate called Sinai Province (previously known as Ansar Bayt al Maqdis), has carried out a series of operations. It claimed responsibility for the bombing of a Russian airliner in the region last fall.
A series of groups in mainland Egypt, including Revolutionary Punishment and the Popular Resistance Movement, have been hitting economic and security targets in Cairo and surrounding governorates. Awad noted that nearly half of the Revolutionary Punishment's assaults have occurred in the Fayoum Governorate, a longtime Brotherhood stronghold, and suggested that there is likely overlap between Revolutionary Punishment and the governorate's branch of the Brotherhood, which remains active underground.
But distinctions between the affiliations of those behind the unrest are difficult to draw, primarily because the Egyptian government's campaign against the Brotherhood has driven Islamists underground while providing a potent recruitment tool for extremism, leading many frustrated Egyptians to retaliate against the state with violence.
Awad noted that uncertainty over precisely who was behind the apartment bombing is to be expected given the complex and shadowy world of militancy in the Giza province where the blast occurred.
"It's a melting pot of Islamist violence that's been brewing for sometime," he remarked.
The situation is such that the cell operating out of the Giza apartment might possibly have had links to both the Islamic State and Revolutionary Punishment.
"Most of these violent actors aren't exactly part of a single group, they are just their own cell," Awad explained. Members of that cell might have overlapped with the Islamic State's Sinai affiliate as well as elements linked to Revolutionary Punishment.
"Perhaps both groups were using the apartment to test explosives," he speculated. "We can't know for sure."
Follow Avi Asher-Schapiro: @AASchapiro