In northern Syria carnage alternates with ceasefires as the Syrian air force pounds the rebel-held eastern side of Aleppo in a bid to drive out the remaining civilians. Rebel artillery replies in kind against government areas in the west of the city, but cannot match the firepower used against their enclave. Airstrikes on Thursday killed at least 28 people in a refugee camp close to the Turkish border.

The purpose of the Syrian government’s air and artillery attacks has remained the same over the last five years and is to separate opposition fighters from the civilian population. “This is the same classic counter-insurgency strategy that was used by the French in Algeria and the US in Vietnam,” says Fabrice Balanche, an expert on Syria at the Washington Institute for Near East Policy. Syrian government forces target rebel-held zones and essential infrastructure such as hospitals and markets so whole districts of cities like Damascus and Homs are reduced to rubble.

In Iraq, the US led coalition is more careful about avoiding civilian casualties, but even so 70 per cent of Ramadi, the capital of Anbar province, has been destroyed and surviving houses have been turned into death traps by booby traps and IEDs planted by Isis. In both Syria and Iraq, inadequate numbers of ground troops – Syrian army, Syrian Kurds, Iraqi Kurds, Iraqi army - claim great victories but in reality act as mopping up forces that can only advance after a devastating aerial bombardment.

The Syrian, Russian and US-led air campaigns have all had their successes, but they have their limitations. Dr Balanche says that the population of opposition-held east Aleppo may be down to as low as 100,000 because of airstrikes, while the much safer government-controlled west of the city still has a population of two million. The US and the coalition have carried out 8,067 air strikes in Iraq and 3,809 in Syria which have inflicted heavy casualties on Isis and interrupted their communications. But strict rules of engagement, intended to avoid civilian casualties, mean that Isis and al-Nusra fighters can stay safe by taking over one floor in a five storey building and leaving the other four floors occupied by ordinary families. While the term “human shield” is much abused, the armed opposition in places like Mosul, Raqqa and Eastern Ghouta forbid civilians from leaving, so terrified people must balance the possibility of being killed by air strikes against that of being murdered or detained by salafi-jihadi checkpoints.

Palmyra before ISIS

Bombs and drones weaken Islamic State, but probably not as much as is hoped in Washington and European capitals. Isis fighters have generally not being fighting to the last man for cities like Ramadi and Palmyra, but pulling back and resorting to guerrilla warfare. In the last few days they claim to have captured the important Shaer gas field in the desert not far from Palmyra. Isis and al-Nusra’s many enemies are divided and pursue different goals. The US and its allies want to defeat Isis, but do not want the Syrian army or the Iraqi Shia militias to be the instruments which inflict that defeat. Syrian and Iraqi Kurdish leaders detest each other, but they are at one in fearing that their value to the West will lapse once Isis is defeated and they will be left to the mercy of Turkey and resurgent regimes in Baghdad and Damascus.

This probably won’t happen for some time. The US is pressing for a swift attack on Mosul and may be deceiving itself about the real military strength of the Iraqi Kurds and the Iraqi Army with the result that US Special Forces get sucked into the fighting when their local ally falters. US military aid is now very extensive. The Pentagon recently announced that “US artillery will support the Iraqi ground offensive against Mosul and the United States will provide up to $415 million to the Kurdish Peshmerga.” There is a small but politically significant trickle of US casualties including a Navy SEAL killed by Isis fighters in a surprise attack north of Mosul last week.

Isis is battered and on the retreat, but is unlikely to be defeated this year. It is losing territory but it is important to keep in mind that much of this is desert or semi-desert. More important is its progressive loss of access to the Turkish border which has been largely sealed off by the advance of the Syrian Kurdish YPG militia assisted by a US air umbrella. The increasingly narrow corridor between Aleppo and the Euphrates that links the self-declared Caliphate to Turkey is under threat from the YPG and their Arab proxies in the east and the Syrian army in the west. If this gap is closed then Isis will have great difficulty receiving foreign volunteers or dispatching terrorists to carry out attacks abroad.

If Isis and al-Nusra are defeated, what will be the impact on the political geography of this part of the Middle East? Sunni Arabs in Iraq make up 20 per cent and in Syria 60 per cent of the population but there is really only one battlefield, so, if the salafi-jihadis lose, so too will the Sunni Arabs as a whole in the band of territory between the Iranian border and the Mediterranean. “In Iraq the war is destroying the Sunni population,” says Professor Joshua Landis who heads the Centre for Middle East Studies at Oklahoma University, pointing out that most of those displaced in the fighting in Iraq over the last two years are Sunni Arabs and the Sunni had already been driven out of much of Baghdad in the sectarian slaughter of 2006-7. A prolonged struggle for Mosul would reduce the last great Sunni stronghold in the country to ruins. “We Sunni in Iraq are going to end up like the Palestinians,” predicted a Sunni Arab from Ramadi last year before the city was partly destroyed.

President Bashar al-Assad said last week that he would fight on to recapture all of Syria and he might go a long way to achieving this. But it would be the triumph of a minority government that could only maintain its authority by terror and military force. It would resemble Saddam Hussein’s Sunni-dominated regime in Iraq after he had crushed the rebellions of the Shia and Kurds, together with 80 per cent of the population, in 1991.

It may not come to this. Not all the news is bad. The most hopeful sign in Syria is that Russia and the US are on occasion acting in unison and have been able for the first time in five years to prod their allies into agreeing ceasefires however shaky and short term. The lesson of the last five years in Syria and the last 13 years in Iraq is that it is very difficult for any single army, government, militia, party, sect or ethnic group to fight successfully for a long period without the support of a foreign power or powers. They may not want to compromise but they may be forced to do so if the alternative is the loss of this essential outside backing. Given that the Assad and anti-Assad forces hate each other, want to kill each other and have no intention of sharing power in future, such compromises are likely to be grudging and short term.

The real test over the coming months will be the extent to which the US and Russia have the desire and capability to enforce a ceasefire or at least a de-escalation of the fighting. A state of permanent war has suited both the government in Damascus and its extreme fundamentalist enemies, because many Syrians who do not like Assad feel that the only alternative to his regime, as the French Algerians used to say, is “the suitcase or the coffin.” Anti-Assad Syrians are likewise faced with a black-or-white choice between a murderous government and murderous Islamists. Only a de-militarisation of Syrian politics might open the way to other alternatives and a distant prospect of permanent peace.