The war in Iraq may become more like the war in Afghanistan over the coming years. Isis forces in fixed and identifiable positions cannot withstand ground assaults backed with intense air attacks by the US Air Force or, in the case of the Syrian army, by the Russians. The last extreme-fundamentalist Sunni state in the wider Middle East found this out in 2001 when US air strikes in support of the numerically smaller Northern Alliance overthrew the Taliban in Afghanistan. Like the Afghan Taliban, Isis may progressively revert to guerrilla war, in which it can best use its highly committed and well-trained fighters without suffering heavy losses.

Isis is coming under growing military pressure from its many enemies on many fronts. The Iraqi army, supported by US air strikes, has recaptured Ramadi, the city that Isis fighters took last May in their biggest victory of 2015. At the opposite border of the self-declared caliphate, the Syrian Kurds are threatening Isis’s hold north of Aleppo and on those parts of northern Syria where it is still in control.

Could it be that the tide has turned finally and irreversibly against Isis? Everywhere it is fighting against ground forces backed by air power, which means that it suffers heavy casualties while opposing troops are unscathed. This was demonstrated during the four-and-a-half-month siege of the Syrian Kurdish city of Kobani in which Isis lost an estimated 2,200 men, killed mostly by bombs and missiles. The city was 70 per cent destroyed and the same may be true of Ramadi, which has been hit by some 600 air strikes since July.

Iraq: Air Force attacks IS positions in Hawija

In the first half of 2015, Isis had several advantages that it has now lost or is in the process of losing. At that time, it had easy access to Turkey at the Tal Abyad border-crossing point, which the Syrian Kurdish People’s Protection Units (YPG) captured in June. It can still move people and supplies across a narrow strip of the frontier west of the Euphrates but the Syrian Democratic Forces, who are in fact the YPG slightly diluted by Sunni Arabs and Christians, seized the October Dam on the Euphrates on 23 December, thus threatening Isis’s whole position north of Aleppo.

Russian air support for the Syrian army means that it is now far more difficult for Isis to win easy victories such as its capture of Palmyra in May. Russian air strikes do not mean that Bashar al-Assad is going to win but they do mean he is unlikely to lose. Isis’s successes in 2014 stemmed in large part from the weakness of its enemies, who disintegrated when attacked by much smaller Isis forces. It had been conceivable, if not likely, that Assad’s rule would crumble under pressure and IS would be the beneficiary. This is no longer the case.

Russian intervention damaged Isis and the other jihadi groups in another way: it energised US military action in Iraq and Syria. Washington made it clear that it did not intend to co-operate with Russia to destroy Isis. But superpower rivalry in the Cold War did not always have negative effects and the US has increased the weight of its air strikes against Isis in support, primarily, of the Iraqi army and the Syrian and Iraqi Kurds. In addition, air strikes – combined with the fall in the price of oil – have largely destroyed the Isis oil economy, once one of its main sources of revenue.

But it is too easy to imagine that these defeats and setbacks mean that Isis is in terminal decline. It is true that there is an implicit, if defiant, acknowledgement that things are not going well in a speech by Caliph Abu Bakr al-Baghdadi made public on 26 December. He said: “Don’t worry, O Muslims, your state is fine and expanding every day and with every harshness that comes upon it, it spits out the hypocrites and agents and becomes more firm and strong.” Presumably, the expansion he is speaking of, assuming that the reference is not purely rhetorical, refers to Libya, Sinai, Yemen, Nigeria and the other countries where IS has taken root.

Unfortunately, there are limitations to the military progress of the four main anti-Isis ground forces: the Iraqi army, the YPG, the Iraqi Kurds and the Syrian army. All have advanced or won local victories because they were supported by intense air strikes. Isis knows that it will always lose if it fights it out in battles and sieges in which its fighters can be easily targeted. This is the lesson of the battle at Ramadi and on other fronts in Syria and Iraq over the past year.

But Isis has learned from its defeats. It did not commit large numbers of fighters to make a doomed last stand at Ramadi, Sinjar, Tal Abyad or Kweiris airbase, east of Aleppo. Important though the Tal Abyad crossing with Turkey was for the caliphate, there may have been only 25 fighters in it when it fell to the YPG. The US said that, in the final stages of the fighting, Isis had reduced its forces in the city to between 250 and 350 men, and most of these slipped away before the end. Isis is reverting to guerrilla war, in which it can best employ the tactics of surprise attacks and ambushes by small, rapidly assembled forces.

There is a reason why such tactics are likely to be particularly effective in the current war. Isis is fighting numerically small armies that have an even more limited number of combat troops who can be deployed. At Ramadi, the Iraqi army used its Golden Division and its best units but US air power was crucial to success. The Iraqi army has some 50,000 men in five divisions and these are of variable quality. The YPG claims to have a similar number of troops, though the real figure is probably lower. The Iraqi Kurdish Peshmerga appears to have acted as a mopping-up force at Sinjar where, again, Isis withdrew rather than making a costly last stand.

There is a further development in the fighting that will work in Isis’s favour: anti-Isis forces may be able to take territory but they cannot necessarily hold it. As Isis’s enemies advance, they will be operating more and more in Sunni Arab-populated areas where support for Isis and hostility to non-Sunni or non-Arab forces will be greatest. This will be true for the Kurds and, whatever their claims to be non-sectarian, for the Iraqi and Syrian armies. Communal hatreds are at such a pitch in Iraq and Syria that occupation by a non-Sunni Arab armed force may provoke a reaction in favour of Isis.