AL ARISH, Egypt They came in Toyota pick-up trucks, dozens of heavily armed masked men, firing machineguns and waving the black flag of al Qaeda as terrified residents and police huddled indoors, and then disappeared again, melting away into the mountains and remote villages of Egypt's Sinai desert.
The raid on the town of al-Arish in July 2011 was the first warning Egypt had of the strength of the jihadis in North Sinai. It was a warning largely unheeded until suspected Islamist militants killed 16 Egyptian border guards this month and drove a stolen armored car across the Israeli border before it was destroyed by Israeli forces.
Egypt is now pouring in troops to try to restore stability, and the sophistication of the border attack has finally set alarm bells ringing about the militant threat in the Sinai.
"Sinai is ideal and fertile ground for al Qaeda," said Khalil al-Anani, a Middle East specialist at Durham University in England. "It could become a new front for al Qaeda in the Arab world."
Diplomats and analysts say there is no evidence as yet of formal links between al Qaeda and the Sinai militants - made up of Bedouin aggrieved at their treatment by Cairo, Egyptians who escaped prisons during last year's uprising against Hosni Mubarak, and Palestinians from neighboring Gaza.
They blend a toxic mix of smuggling, gun-running and human trafficking with the "takfiri" ideology of al Qaeda - which declares all Muslims who do not follow their purist, Salafist interpretation of Islam as "kafirs" - infidels. Crime and religion are soldered by ferocious opposition to Israel.
"The Sinai has become a base for all kinds of extremist groups," Yitzhak Levanon, former Israeli ambassador to Egypt, told Reuters. "Their overarching objective is to hurt us, to expel us, to set up a caliphate and shock the Middle East."
And they pose a serious threat not just to Israel, but, perhaps more importantly, to Egypt.
Any attack on Israel that provoked Israeli retaliation could upset a peace treaty signed with Egypt in 1979 and put huge pressure on new Islamist President Mohamed Mursi. Or militants could turn west to attack the Suez Canal.
"It is much easier for these fundamentalist Bedouin groups inspired by extreme Salafi/Qaeda-like doctrine to attack ships in the Suez Canal than to mount an operation on the Israeli border," said Ehud Yaari, an Israel-based fellow at the Washington Institute for Near East Policy.
The Sinai region, handed over to Egypt by Israel under the terms of their U.S.-brokered peace accord, has long been neglected by Cairo, leaving room for crime to flourish.
But residents in al-Arish, the administrative centre of North Sinai on the Mediterranean coast, said they realized the threat had become much more serious when their town was raided on July 29 last year.
"They looked like trained groups, not the normal thugs we see," said one shopkeeper, who like other residents was afraid to be named for fear of retribution.
Waving copies of the Koran and the flag of al Qaeda - recognizable by the white Arabic lettering declaring faith in Islam superimposed on black to signify jihad - they spread out across the town and took up positions on rooftops.
At the police station nearby, terrified security forces barricaded themselves inside, while the gunmen shot at anyone who ventured outside. "They had all kinds of weapons, including rocket-propelled-grenades," said another resident.
One had a Palestinian accent, said the shopkeeper, saying he heard him speaking over the phone saying that, "Our ammo is over and we don't know where we are."
Six died, including one of the gunmen, before Egyptian reinforcements arrived. "They ran away in all directions and nobody knows where they went," said the shopkeeper.
PINNING HOPES ON MURSI
The newly launched army operation - billed as the biggest offensive in the region since the 1973 war with Israel - has yet to make much of an impact, and may make things worse if heavy-handed tactics drive more youth into the arms of the militants.
"Sinai needs a comprehensive strategy: social, economic and political," said Durham University's Anani.
Some residents even expressed cautious optimism that Mursi - who sacked army chief Hussein Tantawi on Sunday [ID:nL6E8JD1UW] - might improve the situation by reining in the military, whose past crackdowns have helped militants attract fresh recruits.
It was unclear whether Tantawi's sidelining was linked to the attack on the border, although the deaths of the 16 Egyptian guards caused widespread public anger.
"There are some extremist ideas in Sinai but in my view, they don't require all this military mobilization; there should have been a round of dialogue and tribal work," said Abdel Rahman al-Shorbagy, a member of parliament for North Sinai representing the Freedom and Justice Party of Mursi's Muslim Brotherhood allies. He estimated the numbers of militants in the sparsely populated desert region at between 1,000 and 1,500.
Mubarak built up tourist resorts in South Sinai that locals say mostly benefited Egyptians from the Nile Valley, and tried to impose an Egyptian administrative structure on North Sinai which undermined the authority of local Bedouin tribal elders.
Economic neglect forced people to seek work in the Gulf, and after Israel and Egypt imposed a blockade on Gaza in 2007, many made money smuggling arms and other supplies through tunnels into the enclave ruled by the Palestinian Islamist group Hamas.
The situation worsened during the uprising when security forces often abandoned their posts; the fall of Libyan leader Muammar Gaddafi later that year brought an influx of weapons.
For Sinai youth, struggling to make a living, it was easy to be drawn into the simple message of al Qaeda - that only if Muslims return to the purist lifestyle of the Prophet Mohammed can they challenge the economic and political clout of the West.
"What brought this ideology is the marginalization," says one resident. "If someone can't earn a living, he thinks the alternative is to be strict in worship."
In every village, three or four youths have disappeared to join the militants, sometimes inspired by al Qaeda propaganda over the Internet, and sometimes by preachers in local mosques.
They often sever contact with their relatives, not even returning during the month of Ramadan when families gather together for the "iftar" meal which ends the day-long fast.
"We always have iftar together but they never come," said one villager who had two cousins who had joined the militants.
"TORA BORA OF SINAI"
With a lack of roads, development and state control, the mountains and villages of North Sinai's vast desert hinterland are nearly impenetrable, making it easy for militants to hide.
In the Jabal al-Halah mountain in central Sinai, they are believed to be so well dug in that nobody can touch them.
"The Bedouins call this place the Tora Bora of Sinai. The Egyptian authorities are extremely reluctant to go there," said Yaari, in a reference to the Afghan mountain hideout used by al Qaeda after the United States overthrew the Taliban in 2001.
He said, without explaining how he knew, that the men behind the attack on the border had spent some time encamped there.
North Sinai is in some ways similar to the tribal areas of Pakistan, where al Qaeda has dug deep roots. Both have been neglected by central government; both lie in the middle of wider political conflicts.
And the authority of tribal leaders in both has been diminished as money - from crime, Gulf remittances and state patronage - filtered into other hands - making it easier for militants to promote unity in Islam over tribal loyalty.
"We are witnessing today the rise of these new Bedouin fundamentalists," said Yaari. "They are destroying the old tribal structures. They allow marriages between rival tribes and force women to wear the veil. This never happened before."
A particular fear is that militant Salafists in Gaza and Sinai are joining forces, creating an environment ripe for al Qaeda were it to seek a base for use against Israel or the more moderate political Islam of Egypt's Muslim Brotherhood.
Already, according to one Arab diplomat in Islamabad, Egyptian members of al Qaeda have begun to move back from Pakistan to take advantage of political changes at home.
As yet, however, the Sinai militants appear to be mimicking al Qaeda rather than trying to establish formal links with the group whose leader Ayman al-Zawahri - who took over after Osama bin Laden was killed last year - is himself Egyptian.
Diplomats and experts in Gaza say Salafist leaders there speak of admiration for al Qaeda but deny factional ties.
"Al Qaeda is more interested in using Palestine as a tag for its global fight rather than have an actual base in Gaza or the West Bank," said one diplomat. "They believe a Palestinian group would have a more nationalist outlook."
Yaari said he believed the Bedouin jihadis were communicating with al Qaeda in Yemen, and maybe also in north Africa. "But so far, although they are seeking recognition from al Qaeda, they have not obtained it."
He also dismissed suggestions that foreign fighters might have played a big role in the border attack. "There are some foreigners in the Sinai, but they are more like hitchhikers," he said. "If it weren't for the fact that so many are heading to Syria, we would see more in the Sinai."
(Additional reporting by Crispian Balmer in Jerusalem, Nidal al-Mughrabi in Gaza, Myra MacDonald in London and Michael Georgy in Islamabad; Writing by Myra MacDonald; Editing by Mark Heinrich)