FIVE years after Mahmoud Abbas, the Palestinian president, dismissed an elected government run by the Islamists of Hamas and decided to rule instead by decree, the Palestinian Authority (PA) that oversees the West Bank is being dangerously challenged from within. In Nablus, the first city where Mr Abbas chose to fill the security vacuum with his American-trained national-security battalions, turf wars have recently erupted between rival commanders, puncturing four years of calm. The walls of Jacob's Well, a local church, a theatre and the UN office all bear the scars of recent shooting sprees. “It's hell,” says a social worker in Balata, the city's largest refugee camp, which suffered grievously during two previous intifadas (uprisings), in 1987-93 and 2000-05. Now people are beginning gloomily to wonder whether there will be a third intifada, this time aimed at the PA as much as at the Israelis occupying the West Bank.

For the moment Mr Abbas has the upper hand. Dispatched from Ramallah, the PA's seat of government, his presidential guards have detained dozens of rogue security officers, some of them very senior, in Nablus and in Jenin, a smaller Palestinian city half an hour's drive to the north, where the governor recently died of a heart attack after machinegun fire raked his house. In Jenin triumphant officers loyal to Mr Abbas patrol the streets with M-16 rifles captured from their rivals.

The PA's Western donors praise Mr Abbas for his readiness to rein in his own rogues. Israel's generals, who give him a security umbrella, welcome the belated prevention of anarchy. And for the first time in months camp residents are enjoying their first nights of sleep unbroken by gunfire.

Moreover, Nablus people still appreciate the relative prosperity that has revived the city since the second intifada ended in around 2005. Hundreds of businessmen have returned since Israel pulled back from the roadblocks at the city gates. Some 700,000 Arab citizens of Israel came shopping last year in the elegant medieval quarter. The governor hopes foreign tourists will follow, with plans for a “nativity trail” from Nazareth to Bethlehem to make a detour via Nablus. A new hotel and museum are due to open this summer on the ruins of a medieval khan, al-Wikala, which Israeli tanks pummelled during the second intifada. Unemployment has halved, say PA officials. In more affluent districts, young women are discarding veils.

But the camp's residents are deeply divided. Though many are grateful for the calm that Mr Abbas and his appointed prime minister, Salam Fayyad, have brought in the past few years, others resent the heavy-handed security of the PA regime. Imposing muqatas (fortresses) are rising in all the West Bank's main cities. Many Palestinians find the PA's co-operation with Israel galling. “We give them the names and they arrest them,” says an Israeli officer. Many Palestinians fear they are being condemned to indefinite occupation. At a recent funeral for three local fighters whose bodies Israel recently returned to their families, mourners chanted “Down with the PA! Down with Abbas!”

Most worrying for Mr Abbas was the fact that the ringleaders of the recent trouble hailed from his own Fatah party, which provides the bedrock of the PA's security forces. PA officials fear that certain senior Fatah commanders who have fallen foul of Mr Abbas—in particular a former intelligence chief, Tawfiq Tirawi, and a prominent strongman, Muhammad Dahlan—are stoking the unrest in the hope of creating a security vacuum they could later fill. Hamas, which still controls the Gaza Strip but is heavily suppressed in the West Bank by both Israel and the PA, awaits the tardy coming of the Arab spring to Palestine. The Israelis may be content to see Mr Abbas tied up with recalcitrant Palestinians rather than tackling Israel on the world stage. Nablus's commercial regeneration cannot cure a gnawing national malaise. “There is no political horizon,” say disgruntled Palestinians. They increasingly question the point of the PA. It has failed to usher in a Palestinian state, and appears powerless to prevent Israeli military incursions or the relentless expansion of Jewish settlements on the West Bank. “All the windows are closed, and the political elite has no keys to open them,” says Raid Nairat, an academic. The West Bank's 30,000 security forces seem unkeen on a recent quest for reconciliation between Fatah and Hamas that would force them to share power. Their recent round-up of 150 Hamas men helped dampen hopes of a deal. A fiscal crisis is compounding the political one. On paper the PA expects a budget deficit of $1 billion, equivalent to 10% of GDP. But this may well double when arrears owed to private businesses are added. Unpaid for years, suppliers refuse government orders on credit, and are having to cut production and their workforces. Palestinian builders complain that ministries pay them only when they give bribes. “We won't let our financial system go down with the PA,” says a Palestinian banker. Donors, too, are tired. Cash from the Gulf has dwindled, partly because the United Arab Emirates, which used to send $200m a year, seems to have sided with Mr Dahlan. “The crash is coming,” says an official in Mr Fayyad's office. “If we can't pay salaries over Ramadan [the Muslim month of fasting which starts on July 20th], there will be a revolt.”

Few Palestinians call for a renewal of violence. But such talk is again in the air. In some West Bank towns Hizb ut-Tahrir, an extreme Islamist group, has been making headway. “A Muslim army should defend Muslims, not Jews,” says an angry Islamist, denouncing the PA's security co-ordination with Jewish kuffar (unbelievers).