THE Gaza Strip, an enclave tucked between Egypt and Israel that is still ruled by Hamas, a branch of the Muslim Brotherhood, is once again caged in. Egypt’s ruling generals, fearful that what they see as an Islamist tumour on their north-eastern flank might grow back into a Brotherhood cancer, want to contain it, if not cut it out. So they have sent bulldozers to demolish the houses along the border with Gaza that covered the tunnels providing Gaza’s 1.8m people with half their basic needs and most of their fuel and building material.

Of some 300 tunnels that operated before Egypt’s army overthrew Muhammad Morsi, the Muslim Brother who had been president for a year, only ten are said now to function. Above ground, movement across the border has dwindled to a trickle.

At Rafah, on the Gaza side of the main terminal into Egypt, hundreds of people have been waiting to cross for days. A flustered Gazan official, besieged by scores brandishing papers with hospital appointments or flight tickets for onward travel from Cairo, calls out names one by one through a tannoy, and hands out green cards to the few allowed by the Egyptians to board buses on their side of the border.

Among Gazans a sense of crisis is growing. One of the two turbines that power their sole electricity plant has been turned off owing to a fuel shortage. Power cuts last more than half a day. Drivers leave their cars outside petrol stations, waiting for the day they might reopen. In the past few weeks, cigarette prices have tripled. Unemployment, already rife, has risen, with 19,000 building workers being laid off. “Egypt’s rope around Gaza’s neck”, reads the headline of a newspaper run by Hamas, above a photograph of two Egyptian battleships said to be heading Gaza’s way.

Hamas is in trouble. Dues from the tunnels, worth $1m a day, used to provide half of its budget. Its key sponsors—Syria, Iran and Egypt under the Muslim Brotherhood, which once promised a free economic zone and a motorway linking the strip to Egypt—have fallen away. The first Islamist movement to take power on the Mediterranean now talks of making a last stand. Gazans are beginning to wonder if Hamas will stay in charge. “Without Egypt, Gaza is like a branch of a tree cut off at its roots,” ventures a Gazan supporter of Mahmoud Abbas, whose rival Fatah party runs the West Bank, the bigger part of a would-be Palestinian state.

In recent weeks armed men from Islamic Jihad, Hamas’s smaller Islamist rival with stronger ties to Iran, have skirmished with their Hamas counterparts for control of mosques. But Hamas is not about to bow out. Its security men have been putting up checkpoints at night. News agencies have been closed down. Suspected opponents of Hamas are being arrested.

“The showdown has begun,” says the head of an Egyptian community centre who was taken in for questioning by Hamas people after praising the Egyptian army. Hamas’s military wing has been holding defiant parades in view of the Egyptian army across the border. A Hamas firebrand has told people planning protests against the movement that they should “bring their shrouds”.

If it is to survive as Gaza’s ruler, Hamas will have to rely on its old foe, Israel. While Egypt has choked off access to Gaza, Israel has loosened it, with 400 lorries recently entering the strip from Israel via the Kerem Shalom crossing in a single day, the liveliest such traffic for many years. “If they increase demand, we’re ready to step up,” says an Israeli military spokeswoman.

At Friday prayers, some Hamas preachers curse Egypt more than Israel. Hamas border guards arrest and even shoot anyone trying to break the ceasefire with Israel. The 300,000-odd Israelis living in easy rocket range of the border with Gaza are enjoying a rare bout of calm. “Egypt’s closures make us insist more on keeping things quiet with Israel,” says the editor of a Hamas newspaper. Israeli security officials seem to reciprocate. “We’re not doing anything to cause instability to the [Hamas] regime right now,” says an Israeli army man on the border.

Yet Israelis still loathe Hamas, which carried out scores of suicide-bombings against Israelis in the early 2000s. Hamas, meanwhile, reviles Israel for its assaults on Gaza and its leaders. It plainly cannot bank on Israel to keep it going for ever. Nowadays it is unusually lonely.