The rebels of what is called the Islamic State, fighting to redraw the map of the Middle East, have been coaching Egypt’s most dangerous militant group, complicating efforts to stabilise the biggest Arab nation.
Confirmation that the militants are extending its influence to Egypt will sound alarm bells in Cairo, where the authorities are already facing a security challenge from home-grown militants.
A senior commander from the Sinai-based Ansar Bayt Al Maqdis, which has killed hundreds of members of the Egyptian security forces over the last year, said militants have provided instructions on how to operate more effectively.
“They teach us how to carry out operations. We communicate through the Internet,” the commander, who asked to remain anonymous, said.
“They don’t give us weapons or fighters. But they teach us how to create secret cells, consisting of five people. Only one person has contact with other cells.”
Militant groups and the Egyptian state are old foes. Some of Al Qaeda’s most notorious commanders, including its current leader Ayman Al Zawahri, are Egyptian.
One Egyptian president after another has crushed militant groups but they have always resurfaced.
The success of militants in seizing large parts of Syria and Iraq has raised concerns in Egypt, where authorities are battling Ansar as well as militants who have capitalised on the chaos in post-Gaddafi Libya to set up over the border.
Unlike Al Qaeda, which specialises in hit and run operations and suicide bombings, militants act like an army, seizing and holding territory, a new kind of challenge for western-backed Arab states.
Army offensives have squeezed Ansar, forcing its members to flee to other parts of Egypt, the commander said. But it still poses a security threat.
President Abdel Fattah Al Sisi has expressed concerns about militants over the Libyan frontier. Security officials say these groups are inspired by militants, an offshoot of Al Qaeda notorious for beheadings and mass executions, most recently of American journalists James Foley and Steven Sotloff.
Sisi, who as army chief toppled president Mohamed Mursi last year after mass protests against his rule and then cracked down on his Muslim Brotherhood, has restored some political stability.
But militant groups still present a major challenge. Security officials say thousands of Egyptian militants have joined militant’s jihad in Iraq and Syria and authorities are concerned they could return home to fight the government.
That would pile pressure on Egyptian security forces who have failed to end a campaign of bombings and shootings which killed hundreds of soldiers and police since Mursi’s fall.
Egyptian security officials say leaders of militants and Ansar have established contacts. Meanwhile, militants based in Libya have also forged ties with Ansar, creating a complex web.
Ansar recently said it had beheaded four Egyptians, accusing them of providing Israel with intelligence for an air strike that killed three of its fighters.
Four headless corpses were found in the Sinai Peninsula. It was the first time that any decapitations had been made public in Egypt.
In a video on Twitter, armed men in black masks stood over the kneeling captives as one of the militants read out a statement. Minutes later, the four men had their heads cut off.
The Ansar commander, who said his group had contacted militants for advice, described the beheadings as a clear message that anyone cooperating with the group’s enemies would face a similar fate. “The beheadings had a purpose,” he said.
The violence suggested a new level of radicalism in Egypt.
“Ansar and militants definitely have ties but there are no militant members in Egypt,” said a security official.
“There is definitely coordination between Ansar, the militants in Libya and other militant leaders.”
The security official said Egyptian authorities have handed airport officials lists of Egyptians who went abroad to wage war.
“There are some people who we know are coming back to carry out attacks so we arrest them. The same goes for others who come back to visit their families,” he said.
“There is a third type who comes back to recruit. We just watch him until the time is right to move in.”
The movement of Ansar militants from the Sinai to towns and cities outside the peninsula could make it more difficult for intelligence agencies to track the group.
“We have trouble working in Sinai. It’s easier elsewhere,” said the Ansar commander, adding that fighters were benefiting from advice provided by militants.
“They are teaching us how to attack security forces, the element of surprise,” he said. “They told us to plant bombs then wait 12 hours so that the man planting the device has enough time to escape from the town he is in.”
The commander said bombings not carried out by Ansar suggested new militant groups had appeared in Egypt, adding that there is a flow of militants both ways across the Libyan border.
“There are others operating in Egypt. We don’t know anything about them,” he said. “We have individuals who went to Libya. We lost contact.”
Asked about pressure from Egypt’s military, one of the biggest in the world, the commander said security offensives had created new enemies for the state.
“Every time one of us is killed, two or three others join. Usually relatives of those who are killed.”