In the satellite pictures, it looks as if someone has taken an eraser to the lines of houses and farms, smearing them over the arid landscape. But it is Egyptian army bulldozers that are blotting Rafah away, block by block. It is the desolation of Sisi, the most shocking and lurid of the many ways that Egypt’s military has gotten everything wrong in Sinai, behaving like an occupying army on its own land, fighting a terrorist insurgency in the most inept way possible. In the destruction of this once thriving border town of 78,000 is the starkest example of how Egypt’s military rulers are driving the country to further ruin.

The last time I visited Northern Sinai, it was a windy winter week in 2008, under a morose sky. In the surreal reddish half-light of an early sandstorm, the Egyptian army was hunting Palestinians. Across the border in the Gaza Strip, where Israel keeps more than a million and a half people bottled up in an open-air prison, the Palestinians had finally had enough; they’d flung down the Egyptian border fences and were crossing in their thousands to the Egyptian side, seeking food and medicine and a few days’ respite. On orders from Tel Aviv and Washington, the Egyptians were trying to cut the vacation short: they had shut down all the businesses in the region, arresting any Egyptians who did any trade with Palestinians, and were systematically rounding up the Palestinians who had crossed.

It quickly became apparent that a major problem for the Egyptian army was that many locals felt closer to the Gazans than they did to the Egyptian army and the state security agents who were here making life miserable for them. Their loyalties were not merely geographical: a third of the people who live in the regional capital of Al-Arish have Palestinian ancestry. Like the native Gazans next door, the people of the Sinai are Bedouins at root, traditionally nomadic people who speak with an accent closer to the traditional Gazan accent than to the way people talk in the faraway Nile Valley. People I met in Al-Arish and Sheikh Zuwayd called people from the Nile Valley ‘the Egyptians,’ a small but perhaps telling suggestion of their distance from the police and soldiers and bureaucrats who ruled their lives.

I never got past the outskirts of Rafah, the Egyptian border town that sits astride the frontier with Gaza at the edge of the Mediterranean, smaller twin to the Gazan town of the same name on the other side of the border; I was turned away by state security. But if I had seen Rafah, it would have been for the last time anyway; the Egyptian army under Abdelfattah al-Sisi has systematically demolished nearly the entire town.

Intended to sever all ties between Gaza and Egypt, the destruction began with the 2013 military coup which overthrew the short-lived Muslim Brotherhood government of Mohammed Morsi. Army officers spoke darkly of Palestinian Hamas terror cells training in the mountains of Sinai, and began bulldozing a strip of Rafah’s houses along the frontier, in order to disrupt the Palestinian tunnel smuggling network.

Though the talk of Hamas in the Sinai was laughable posturing, it is indisputable that the small network of Egyptian Bedouin Al-Qaeda sympathizers who had been blowing up hotels and cafes throughout the tourist zone of Southern Sinai since 2004 had benefited from the porous border with Gaza: there they had found material and training for their murderous campaign as well as refuge from Egyptian security forces. But the real motivation was clearly once again to please Tel Aviv and Washington, who preferred to keep the sardine tin that is Gaza tightly shut.

The destruction of Rafah came in stages, as the accompanying illustration shows. In 2013 a strip of houses and farms a few hundred meters wide was bulldozed. In Oct. 2014, a wider “buffer zone” was laid down through hundreds of former homes; by last year the area of destruction abruptly expanded by kilometers, and almost the entire town had been destroyed; the remaining buildings in the illustration are likely used by security forces. The area of destruction is far wider than the ‘security strip’ bulldozed by the Israelis on the Palestinian side. Indeed it is so large that it can really only be seen as a form of collective punishment for Rafawis’ intransigent closeness with their Palestinian neighbors.

In the minds of Egypt’s military planners, each stage of Rafah’s destruction (as well as smaller scale destruction in other towns) was probably a response to the Islamist insurgency which was spreading among the Sinai Bedouins, an insurgency whose ideological loyalty was shifting from the vague international jihadism of Al-Qaeda to the cult-like state-building effort of ISIS. The insurgency had been founded by a Bedouin dentist from Arish, imprisoned and tortured under Mubarak, who had emerged from jail with a hatred of the Egyptian regime and a religious ideology to replace it.

As the insurgency morphed from a vaguely anti-Israel campaign targeting tourism and economic infrastructure, into a direct confrontation with the Egyptian army, virtually everything the army has done seems to be what one commentator called a textbook example of how not to run a counterinsurgency.

After displacing 40,000 people in Rafah and nearby Sheikh Zuwayd by blowing up their houses (sometimes by just shooting at them with artillery pieces), the Egypt’s new military regime made virtually no effort to house any of these understandably angry citizens; most apparently ended up living in slums in Al-Arish and elsewhere around the Sinai. A few weeks ago the cabinet finally allocated some money to build new apartment blocks for them, though the timeline is uncertain.

Last month a video was posted to Facebook showing Egyptian troops quizzing a group of prisoners about their tribal affiliations, then casually murdering them and arranging the corpses for photographs with guns, as if they had been killed in battle. In January, the regime announced they had heroically stormed a houseful of terrorists in Al-Arish, killing them all in a gun battle. When the names were released, their families pointed out that they’d all been arrested in Arish months before, disappearing into the hungry maw of Egypt’s prison system before being abruptly disgorged in the imaginary gun battle. Either some bureaucrat in charge of forced disappearances had misfiled their manner of arrest before they were murdered, or Cairo just didn’t care about plausible deniability.

Meanwhile, the insurgents, who now called themselves the Sinai Province of the Islamic State (the dentist and several of his successors having been killed, it is now led by someone called Muhammad al-Isawi) have blown up at least one airplane full of tourists, endlessly bombed the pipeline that exports gas to Israel, murdered enough Coptic Christians that they have all left the Sinai, killed many hundreds of Egyptian soldiers with sophisticated combined arms assaults on military bases and checkpoints, briefly occupied the city of Sheikh Zuwayd, repeatedly cut off the electricity to Sinai’s cities and towns for weeks on end, and are now apparently spreading their insurgency into the Nile Valley.

In other words, even as it behaves like an occupying foreign power in Northern Sinai, the Egyptian Army does not appear to be winning its occupation in any definable sense.