WHEN not organising protests at the gates of Basra’s giant oilfields, jobless graduates spend their days playing dominoes on the banks of the Shatt al-Arab river. By night, giant gas flares light the sky and their game, partly compensating for the blackouts. “We provide the oil that powers the world, but live in darkness,” says a sometime protester.

The authorities dispersed the demonstrators, violently, after Lukoil, a Russian oil firm, threatened to halt production. But few predict quiet. Bereft of hope, the players debate abandoning peaceful protest and summoning the Hashad al-Shabi, the Iranian-backed militias the ayatollahs raised to beat back Islamic State (IS), to intervene on their behalf. While the world has looked north to the war on IS, local politicians argue that the south poses no less a threat. “Basra is financing Iraq,” says Ali Shaddad al-Fares, who heads the local council’s oil committee. “Iraq’s stability depends on Basra’s stability.”

Basra should be Iraq’s most successful province. It lies furthest from IS’s front lines and has a tradition as the country’s most cosmopolitan city. It remains the country’s dynamo. It has Iraq’s only ports, and oil production that generates around 95% of the government’s oil revenues. But four decades of war, sanctions, occupation, neglect and Shia infighting have rendered it decrepit and dysfunctional. Its utilities are worse than those of Mosul, Iraq’s second city, which is controlled by IS. Power cuts last most of the day. The water is stickily saline. The air is acrid from oil plumes and from sewage that dribbles into collapsed canals which once saw Basra called “the Venice of the East”. Cholera is back. “Our health was better under sanctions and Saddam Hussein,” says a local councillor. With nothing to do, the city’s youth turn to militias for jobs. They are probably the province’s largest employer. 70% of the Hashad come from Basra, its commanders say. International oil companies might have kick-started the economy, but chose to locate all but essential operations abroad. Though local hire is cheaper, under their oil contracts, whoever they hire the Iraqi government pays. Such are the inflated costs that producing a barrel of Iraqi oil costs twice as much as in Saudi Arabia. The oil companies argue that foreign labour is more reliable. But had the security environment been better and had Iraq paid its dues, they might have established training centres and universities in Iraq just as they did in Saudi Arabia. By sealing themselves off from Iraq, they are creating a vicious circle. As the gap between them and the locals widen, grievances mount. Worried about the prospects, Occidental Petroleum Corp, America’s fourth-largest producer, asked the government to buy back its stake in Zubair, a large southern oilfield, last month. Iraqi politics compounds the lack of opportunity. The ruling parties in Baghdad divvy up the oil revenues before they trickle south. Their local representatives immobilise the rest. Basra’s governor, council head and mayor all belong to rival religious Shia parties. Each vetoes the others’ decisions and projects. Their militiamen jostle for control on the streets. In October 2014 Badr, the most powerful militia group, took over Saddam’s palace, from where the British ran their occupation in 2003, and pinned portraits of Iran’s supreme leader, Ali Khamenei, and Shia Iraq’s own religious leader, Ali al-Sistani, on its walls. Posters of their martyrs line Basra’s highways. The limited political freedoms gained since Saddam’s fall are receding.

“We’re fooling them that they’ll have prospects,” says Rashwan Sharif, a speaker at a recent gathering of 50 computer programmers spending the weekend under the banner “No talk, all action, launch a startup in 54 hours”. “Basra is like the Titanic. It’s very rich, but on course for an iceberg.” The oil companies invited all cried off, citing prohibitive security costs. “The middle class are selling what assets they still have and are fleeing the country,” says a local journalist, who is toying with following them. Flights bound for Istanbul leave full and return half empty. But the numbers in Basra are quickly replenished. Land clearance for oilfields has triggered a rural flight, ringing the city in shantytowns. More arrive from poorer neighbouring provinces with no oil. As an urban middle class is replaced by more conservative, poorer people from the countryside, Basra’s character is changing.

“We never had tribal feuds,” says a rare local female film-maker, Kholoud Jabbar. “We were a port city. We were open to outside cultures.” Sheikh Zayed bin Nahyan, the first emir of the Emirates, is said to have so enjoyed Basra’s bars and restaurants that he used it as his model for Dubai. Its art scene was the region’s liveliest. But its open-air cinemas have long since closed under a religious ban. Basra’s old lattice balconies droop into the canals. Carved Ottoman doors fall from their hinges and clog the alleys. Restoration of the city’s grand old Jewish and Greek palaces stopped when Saddam was overthrown.

An hour’s drive north of Basra, the city of Amara shows what could be possible. There, the Shia religious parties co-operate, holding each other to account rather than blocking each others’ projects. The province has revamped its roads and sewage system and sports flashy government buildings. Chinese contractors shop in the markets without their security escorts. Two new gas-powered plants are set to fire up next year. But much worse can happen, too. In 2013 Iraqis in the disenfranchised north-west staged months of protests, which the authorities ignored and then fiercely repressed. Islamic State took their place, offering another way.