Updated

In a remote outpost in Egypt's Sinai Peninsula, Ibrahim Abu-Sefira watches a mountainous skyline of jagged rock, ears tuned to the twilight silence, listening for any signs a fragile peace may be disturbed.

An elder from the Bedouin Tayaha tribe, he has seen armies, both Egyptian and Israeli, pass through this vast desert. Now the area is the center of a yearslong, bloody conflict between the Egyptian military and a local affiliate of the Islamic State group.

In a switch from the past, the military has begun arming Bedouin tribesmen like Abu-Sefira and having them patrol in operations against the IS militants deep in the peninsula's interior, where their local knowledge gives them an advantage, Abu-Sefira and other Bedouin say.

"We have to do it, it's our duty to make the people feel safe from the terrorists who were killing us," Abu-Sefira told The Associated Press by telephone from a checkpoint he was manning along with a dozen other men from the area, near the Halal mountains where the IS affiliate has been known to stockpile weapons and equipment.

The military has not publicly acknowledged arming and using the Bedouin as a fighting force, saying only that they cooperate and provide intelligence. In the past, security forces have been wary of giving weapons to the Bedouin, given the long history of tensions with the tribesmen. The shift appears to be an attempt to bring the Sinai population more onto the government's side in the fight.

Egypt has struggled to defeat the insurgency, led by the IS affiliate known as the Sinai Province of the Islamic State. For years, the epicenter of the conflict has been in a triangle of towns and cities in the northeast corner of Sinai on the Mediterranean coast. The insurgency gained momentum after general-turned-President Abdel-Fattah el-Sissi led the army's overthrow in 2013 of the elected but divisive Islamist president, Mohammed Morsi.

Thousands of security forces and civilians have been killed, and thousands more arrested in what critics describe as a heavy-handed security crackdown. Homes have been destroyed, and heavy restrictions imposed on the movement of people and goods.

The war has largely taken place hidden from the public eye, with journalists, non-residents and outside observers barred from the area. The conflict has also been kept at a distance from tourist resorts at the southern end of the peninsula.

In February, the military launched a massive operation in Sinai that also extended to encompass parts of the Nile Delta and deserts along the country's western border with Libya. Since then, the pace of IS attacks in Sinai's main theater has slowed to a trickle.

In the operation, the army has employed a force known as the Abdelsalam group, with several thousand Bedouin, deployed in central parts of Sinai. Their main role is to accompany troops on patrols and raids searching for weapons caches, as well as manning checkpoints to control roads, tribesmen have told the AP.

Usually if fighting erupts, the Bedouin move back while security forces engage, but "some of us even stay and fight up front," says Abu-Sefira, who patrols several times a week with the army.

The tribesmen estimate that around 100 Bedouin have been killed, whether in gunbattles or by roadside bombs. They said they operate under Egypt's Third Army and are regularly attached to its units, with 4x4s and armored vehicles.

The Bedouin role points to how the fight has expanded beyond the coastal towns deep into the desert landscape of the peninsula. The tribesmen spoke of operating in areas as far as 90 miles (150 kilometers) south of the coast.

"Central Sinai is now mostly cleared," said Saleh Ibn-Rashid, also of the Tayaha tribe. He said the army offered his unit assault rifles, light machine guns, body armor and helmets. "They treat us like soldiers and give us everything we need," he said, adding that his men have uncovered explosives, fuel supplies, cars and other equipment in homes and caves.

Allison McManus, a research director at the U.S.-based Tahrir Institute for Middle East Policy, said the military benefits from the Bedouins' knowledge of the terrain and local intelligence.

But cooperation "should be part of a long-term strategy that includes plans for disarmament, demobilization, and reintegration to avoid protracted armed conflict once the insurgency is defeated," she said.

Tribesmen were already providing scouts and intelligence to the military under a broader organization, the Sinai Tribes Union. There have also been local arrangements with armed Bedouin in key combat zones near the Gaza border.

The Abdelsalam group represents a more direct cooperation, arming the Bedouin — who do not serve in the military — in a militia-like arrangement over a larger area.

The development recalls the Sahwa movement in Iraq, where U.S. forces armed Sunni tribesmen to fight al-Qaida after the outbreak of Iraq's sectarian fighting in 2006, although in the Egyptian case the weapons are likely lighter and fewer. IS statements have referred to the Sinai tribal forces as "Sahwa" — which in jihadi parlance denounces them as turncoats.

The Sahwa experience in Iraq also provides a warning. Some fighters in the Sunni militias later joined militants after the Shiite-led Iraqi government shunned the Sahwa.

The Egyptian military in the past balked at arming the Bedouins for fear the weapons could be turned against security forces. The Bedouins have long complained of discrimination by the government, lack of development and abuses by security forces.

The tribesmen contacted by the AP said they were participating voluntarily, without pay. One, who requested anonymity for security reasons, said they believe an end to the militants would mean the army would build more infrastructure in the impoverished area.

Greenfly, the online name of a blogger who tracks open source information on the Egyptian military, said that at the very least, the cooperation shows local residents expect the army to win eventually.

"They're not there out of the goodness of their hearts — it's clear self-interest and they want to side with the victors."

___

Follow Brian Rohan on Twitter: www.twitter.com/Brian_Rohan

___

Associated Press writer Samy Magdy in Cairo contributed to this report.