THE birds of Diyarbakir are doing very little perching these days. Just when they manage to settle on a satellite dish, a blast of artillery or machine-gun fire sends them dashing skyward. The humans who live here are distraught, too. “We can barely get any sleep,” says a woman walking her son to school just outside the Sur district, the city’s historic centre, where Turkish forces are battling militants aligned with the Kurdistan Workers’ Party (PKK).

In July the PKK, which has waged a decades-long war for Kurdish self-rule, returned to killing Turkish police and soldiers after a two-year ceasefire. The group accused Turkey of tacitly supporting Islamic State (IS). (The jihadists had tried to wipe out the Syrian Kurdish border town of Kobane as Turkish soldiers looked on, and have killed scores of Kurds in bomb attacks across Turkey.) Turkey responded with air raids on PKK camps and a crackdown in the largely Kurdish south-east. Since then, fighting in Diyarbakir and other Kurdish cities has killed at least 230 Turkish security officers, up to 240 civilians and hundreds of PKK fighters, says the International Crisis Group, a think-tank. Last week a PKK car bomb killed a police officer, three children and two other civilians.

In Diyarbakir Turkish tanks, along with 2,000 police and soldiers, appear bent on burying in rubble the PKK fighters still holed up in Sur. The region’s governor, Huseyin Aksoy, has heard reports of 50 to 70 militants left in the old city. He insists that the army has trained most of its firepower on the militants’ booby-trapped ditches and barricades: “The heavy weapons are not being used against people.”

Locals disagree. Residents fleeing Sur say swathes of their neighbourhood have been destroyed by artillery fire. Historical sites, including a 16th-century mosque and a newly restored Armenian church, have been damaged, says Ahmet Ozmen, deputy head of the local bar association. In November the bar’s president, Tahir Elci, was shot dead during a gun battle moments after making a televised plea for peace.

The local economy, which was just emerging from decades of war, is again reeling. Metin Aslan, of the local chamber of commerce, estimates the cost to Diyarbakir alone at more than $300m; the unemployment rate threatens to climb from 16% last year to over 30%. The city’s gleaming new international airport, a reminder of the faith investors once placed in peace talks between the PKK and the government, is nearly empty.

The PKK, its ambitions fanned by Western support for Kurdish victories over IS in Syria, is facing a reality check in Turkey. Its fighters may hold out for a few more weeks in Sur, Silopi and Cizre, but it stands little chance of wresting territory from a government that boasts NATO’s second-biggest army and has few qualms about using force. Yet the rebels may not care. The longer the fighting lasts, the more recruits are driven into the group’s arms, says Cengiz Candar, a Turkish analyst: “The way they see it, even if they lose militarily…they stand to gain politically.” The ruling Justice and Development (AK) party of President Recep Tayyip Erdogan also feels it has little to gain from de-escalation. After a decisive win in November’s election, brought about in part by the fighting and a surge in Turkish nationalist sentiment, Mr Erdogan believes he has a mandate to pummel the rebels. “As unfeasible as it is, Turkish voters are focused on eradicating the PKK,” says Akin Unver, an academic. “That’s the dream the government sold to the electorate.” Mr Erdogan, who for years has wanted to change the constitution to grant himself an executive presidency, may even be considering another snap poll after two ballots last year. “He thinks he can get another 5% of the vote,” says Mr Unver. That could be enough to keep the pro-Kurdish Peoples’ Democracy Party (HDP) out of parliament and give AK enough votes to change the constitution.