Isis is under attack in and around the last three big cities it holds in Iraq and Syria – Fallujah, Mosul and Raqqa. It is likely to lose these battles because its lightly armed if fanatical infantry, fighting from fixed positions, cannot withstand air strikes called in by specialised ground forces. They must choose between retreating and reverting to guerrilla war or suffering devastating losses.

It is two years since Isis launched itself on the world by capturing Mosul, the second largest city in Iraq, though it had already taken Fallujah 40 miles west of Baghdad at the start of 2014. In its first campaigns, its ability to achieve surprise by using mobile columns of vehicles packed with experienced fighters was astonishingly effective.

It had developed these military techniques in the years of warfare that followed the US invasion of Iraq in 2003, first fighting the Americans and later the Iraqi army. Its menu of tactics combined ideological fanaticism with a high degree of expertise and rigorous training, and was distinguished by the mass use of suicide bombers, snipers, IEDs, booby traps and mortar teams.

Atrocities highly publicised through the internet terrified and demoralised opponents even before Isis fighters appeared and go a long way to explaining why an Iraqi army, far superior to Isis in numbers and equipment, broke up and fled when Isis attacked it in Mosul in 2014.

But these tactics no longer work as well as they once did. All the armies battling Isis are trained to eliminate suicide bombers before they get close enough to kill. Isis can still recruit young men – and occasionally women – willing to die, but these days they seldom inflict mass casualties among enemy soldiers as they used to do.

Heavy clashes in Fallujah

Last weekend, six suicide bombers attacked the front line between Mosul and the Kurdish capital, but although they all died blowing themselves up or were killed before doing so, they only succeeded in wounding a single Kurdish Peshmerga. Like the Japanese Kamikaze pilots who attacked US and British ships in 1944-45, suicide bombers are achieving diminishing returns against better prepared defences.

Peshmerga advancing towards Mosul in the past few days are accompanied by excavators to dig trenches immediately in front of their forces as soon as possible so bombers cannot reach them with vehicles full of explosives. Unfortunately, suicide bomber are still able to slaughter civilians in great numbers by attacking undefended targets such as markets, pilgrimages, checkpoints and hospitals.

Kurdish Peshmerga forces move into Mufti village, east of Mosul, after it was recaptured from Isis earlier this week (EPA)

Isis is not the all-conquering military force it once was, but the war in Iraq and Syria is as much about politics as military success. At issue for all involved in the conflict in its present phase is not only the breaking Isis control of territory, but determining who will rule there in place of Isis.

So, if the Shia paramilitaries of the Hashd al-Shaabi, whom the US says are under Iranian influence, play the leading role in capturing Fallujah, this will help secure their long-term power and prestige in Iraq. It will be seen as a success for Iran rather than the US and its allies. Equally important in shaping the future political geography of the Middle East will be the relative roles of the Kurdish Peshmerga, Iraqi army and the US in driving Isis from Mosul or, in Syria, of the Syrian Kurds, their Arab allies, the US and the Syrian Army in taking Raqqa from Isis.

In pictures: The rise of Isis Show all 74 1 /74 In pictures: The rise of Isis In pictures: The rise of Isis Isis fighters Fighters of the Islamic State wave the group's flag from a damaged display of a government fighter jet following the battle for the Tabqa air base, in Raqqa, Syria AP In pictures: The rise of Isis Isis fighters Fighters from Islamic State group sit on their tank during a parade in Raqqa, Syria AP In pictures: The rise of Isis Isis fighters Fighters from the Islamic State group pray at the Tabqa air base after capturing it from the Syrian government in Raqqa, Syria AP In pictures: The rise of Isis Isis fighters Fighters from extremist Islamic State group parade in Raqqa, Syria AP In pictures: The rise of Isis Isis kidnapping A video uploaded to social networks shows men in underwear being marched barefoot along a desert road before being allegedly executed by Isis Getty Images In pictures: The rise of Isis Isis kidnapping Haruna Yukawa after his capture by Isis In pictures: The rise of Isis Isis kidnapping Khalinda Sharaf Ajour, a Yazidi, says two of her daughters were captured by Isis militants Washington Post In pictures: The rise of Isis Isis fighters Spokesperson for Isis Vice News via Youtube In pictures: The rise of Isis A pro-Isis leaflet A pro-Isis leaflet handed out on Oxford Street In London Ghaffar Hussain In pictures: The rise of Isis Isis fighters Isis Jihadists burn their passports In pictures: The rise of Isis Isis controls Syrian Aid A man collecting aid administered by Isis in Syria In pictures: The rise of Isis Isis controls Syrian Aid A woman collecting aid administered by Isis in Syria In pictures: The rise of Isis Isis controls Syrian Aid Local civilians queue for aid administered by Isis. Since it declared a caliphate the group has increasingly been delivering services such as healthcare, and distributing aid and free fuel In pictures: The rise of Isis Iraq crisis Iraqi security forces detain men suspected of being militants of the Isis group in Diyala province In pictures: The rise of Isis Iraq crisis Mourners carry the coffin of a Shi'ite volunteer from the brigades of peace, who joined the Iraqi army and was killed during clashes with militants of the Isis group in Samarra, during his funeral in Najaf In pictures: The rise of Isis Iraqi refugees An Iraqi Shiite Turkmen family fleeing the violence in the Iraqi city of Tal Afar, west of Mosul, arrives at a refugee camp on the outskirts of Arbil, in Iraq's Kurdistan region In pictures: The rise of Isis Isis leader Abu Bakr al-Baghdadi A photograph made from a video by the jihadist affiliated group Furqan Media via their twitter account allegedly showing Isis leader Abu Bakr al-Baghdadi delivering a sermon during Friday prayers at a mosque in Mosul. Abu Bakr al-Baghdadi declared an Islamist caliphate in the territory under the group's control in Iraq and Syria In pictures: The rise of Isis Islamic extremists destroying mosques in Iraq Shiite's Al-Qubba Husseiniya mosque explodes in Mosul In pictures: The rise of Isis Islamic extremists destroying mosques in Iraq Smoke and debris go up in the air as Shiite's Al-Qubba Husseiniya mosque explodes in Mosul. Images posted online show that Islamic extremists have destroyed at least 10 ancient shrines and Shiite mosques in territory - the city of Mosul and the town of Tal Afar - they have seized in northern Iraq in recent weeks In pictures: The rise of Isis Islamic extremists destroying mosques in Iraq A bulldozer destroys Sunni's Ahmed al-Rifai shrine and tomb in Mahlabiya district outside of Tal Afar In pictures: The rise of Isis Iraq crisis Iraqi security forces celebrate after clashes with followers of Shiite cleric Mahmoud al-Sarkhi, in front of his home in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis Iraqi security forces arrest a follower of Shiite cleric Mahmoud al-Sarkhi after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis Iraqi security forces arrest a follower of Shiite cleric Mahmoud al-Sarkhi at his home after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis Iraqi security forces arrest a follower of Shiite cleric Mahmoud al-Sarkhi after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraq crisis A vehicle burns in front of a home of a follower of Shiite cleric Mahmoud al-Sarkhi after clashes with his followers in the Shiite holy city of Karbala, 50 miles (80 kilometers) south of Baghdad In pictures: The rise of Isis Iraqi refugees An Iraqi woman holds her exhausted son as over 1000 Iraqis who have fled fighting in and around the city of Mosul and Tal Afar wait at a Kurdish checkpoint in the hopes of entering a temporary displacement camp in Khazair In pictures: The rise of Isis Iraqi refugees Displaced Iraqi women hold pots as they queue to receive food during the first day of the Islamic holy month of Ramadan, at an encampment for displaced Iraqis who fled from Mosul and other towns, in the Khazer area outside Irbil, north Iraq In pictures: The rise of Isis Isis fighters in Syria A militant Islamist fighter waving a flag, cheers as he takes part in a military parade along the streets of Syria's northern Raqqa. The fighters held the parade to celebrate their declaration of an Islamic "caliphate" after the group captured territory in neighbouring Iraq In pictures: The rise of Isis Isis fighters in Syria Isis fighters wave flags as they take part in a military parade along the streets of Syria's northern Raqqa province Reuters In pictures: The rise of Isis Isis fighters in Syria Isis fighters travel in a vehicle as they take part in a military parade along the streets of Syria's northern Raqqa province In pictures: The rise of Isis Isis fighters in Syria Fighters from the Isis group during a parade with a missile in Raqqa, Syria. Militants from an al-Qaida splinter group held a military parade in their stronghold in northeastern Syria, displaying U.S.-made Humvees, heavy machine guns, and missiles captured from the Iraqi army for the first time since taking over large parts of the Iraq-Syria border In pictures: The rise of Isis Isis fighters in Syria Isis fighters during a parade in Raqqa, Syria In pictures: The rise of Isis Isis fighters in Syria Fighters from the Isis group during a parade in Raqqa, Syria. Militants from the splinter group held a military parade in their stronghold in northeastern Syria, displaying U.S.-made Humvees, heavy machine guns, and missiles captured from the Iraqi army for the first time since taking over large parts of the Iraq-Syria border In pictures: The rise of Isis Isis fighters in Syria Isis fighters hold a military parade in their stronghold in northeastern Syria In pictures: The rise of Isis Isis fighters in Syria Isis fighters during a parade in Raqqa, Syria In pictures: The rise of Isis Isis fighters in Syria A member loyal to the Isis waves an Isis flag in Raqqa In pictures: The rise of Isis Iraq crisis Iraqi anti-government gunmen from Sunni tribes in the western Anbar province march during a protest in Ramadi, west of Baghdad. The United Nations warned that Iraq is at a "crossroads" and appealed for restraint, as a bloody four-day wave of violence killed 195 people. The violence is the deadliest so far linked to demonstrations that broke out in Sunni areas of the Shiite-majority country more than four months ago, raising fears of a return to all-out sectarian conflict In pictures: The rise of Isis Iraq crisis Iraqi security forces hold up a flag of the Isis group they captured during an operation to regain control of Dallah Abbas north of Baqouba, the capital of Iraq's Diyala province, 35 miles (60 kilometers) northeast of Baghdad In pictures: The rise of Isis Isis fighters in Iraq Isis fighters parade in the northern city of Mosul In pictures: The rise of Isis Iraq crisis Volunteers, who have joined the Iraqi army to fight against the predominantly Sunni militants from the radical Isis group, demonstrate their skills during a graduation ceremony after completing their field training in Najaf In pictures: The rise of Isis Iraq crisis Kurdish Peshmerga troops fire a cannon during clashes with militants of the Isis group in Jalawla, Diyala province In pictures: The rise of Isis Lieutenant General Qassem Atta speaks during a press conference Iraqi Prime Minister's security spokesman, Lieutenant General Qassem Atta speaks during a press conference about the latest military development in Iraq, in the capital Baghdad. Iraqi forces pressed a campaign to retake militant-held Tikrit, clashing with jihadist-led Sunni militants nearby and pounding positions inside the city with air strikes in their biggest counter-offensive so far In pictures: The rise of Isis A police station building destroyed by Isis fighters An exterior view of a police station building destroyed by gunmen in Mosul city, northern Iraq. Iraq's new parliament is expected to convene to start the process of setting up a new government, despite deepening political rifts and an ongoing Islamist-led insurgency. Iraqi President Jalal Talabani issued a decree inviting the new House of Representatives to meet and form a new government In pictures: The rise of Isis Isis fighters in Iraq Smoke billows from an area controlled by the Isis between the Iraqi towns of Naojul and Tuz Khurmatu, both located north of the capital Baghdad, as Iraqi Kurdish Peshmerga forces take part in an operation to repel the Sunni militants In pictures: The rise of Isis Iraqi refugees An elderly Iraqi woman is helped into a temporary displacement camp for Iraqis caught-up in the fighting in and around the city of Mosul in Khazair In pictures: The rise of Isis Iraqi refugees An Iraqi Christian woman fleeing the violence in the village of Qaraqush, about 30 kms east of the northern province of Nineveh, cries upon her arrival at a community center in the Kurdish city of Arbil in Iraq's autonomous Kurdistan region In pictures: The rise of Isis Iraqi refugees An Iraqi woman, who fled with her family from the northern city of Mosul, prays with a copy of the Quran AP In pictures: The rise of Isis Isis fighters in Iraq The body of an Isis militant killed during clashes with Iraqi security forces on the outskirts of the city of Samarra Reuters In pictures: The rise of Isis Iraq crisis Iraqi civilians inspect the damage at a market after an air strike by the Iraqi army in central Mosul EPA In pictures: The rise of Isis Iraq crisis Members of the Al-Abbas brigades, who volunteered to protect the Shiite Muslim holy sites in Karbala against Sunni militants fighting the Baghdad government, parade in the streets of the city AP In pictures: The rise of Isis Iraq crisis Shia tribesmen gather in Baghdad to take up arms against Sunni insurgents marching on the capital. Thousands have volunteered to bolster defences AFP/Getty In pictures: The rise of Isis Iraq crisis A van carrying volunteers joining Iraqi security forces against Jihadist militants. Prime Minister Nuri al-Maliki announced the Iraqi government would arm and equip civilians who volunteered to fight AFP/Getty In pictures: The rise of Isis Iraq Fighters of the Isis group parade in a commandeered Iraqi security forces armored vehicle down a main road at the northern city of Mosul In pictures: The rise of Isis Iraq An Islamist fighter, identified as Abu Muthanna al-Yemeni from Britain (R), speaks in this still image taken undated video shot at an unknown location and uploaded to a social media website. Five Islamist fighters identified as Australian and British nationals have called on Muslims to join the wars in Syria and Iraq, in the new video released by the Isis In pictures: The rise of Isis Iraq Al-Qa’ida inspired militants stand with captured Iraqi Army Humvee at a checkpoint belonging to Iraqi Army outside Beiji refinery some 250 kilometers (155 miles) north of Baghdad. The fighting at Beiji comes as Iraq has asked the U.S. for airstrikes targeting the militants from the Isis group. While U.S. President Barack Obama has not fully ruled out the possibility of launching airstrikes, such action is not imminent in part because intelligence agencies have been unable to identify clear targets on the ground, officials said In pictures: The rise of Isis Iraq Militants attacked Iraq's main oil refinein Baiji as they pressed an offensive that has seen them capture swathes of territory, a manager and a refinery employee said In pictures: The rise of Isis Iraq Militants from the Isis group parading with their weapons in the northern city of Baiji in the in Salaheddin province In pictures: The rise of Isis Iraq A smoke rises after an attack by Isis militants on the country's largest oil refinery in Beiji, some 250 kilometers (155 miles) north of the capital, Baghdad. Iraqi security forces battled insurgents targeting the country's main oil refinery and said they regained partial control of a city near the Syrian border, trying to blunt an offensive by Sunni militants who diplomats fear may have also seized some 100 foreign workers In pictures: The rise of Isis Iraq Militants of the Isis group stand next to captured vehicles left behind by Iraqi security forces at an unknown location in the Salaheddin province. For militant groups, the fight over public perception can be even more important than actual combat, turning military losses into propaganda victories and battlefield successes into powerful tools to build support for the cause In pictures: The rise of Isis Iraq An injured fighter (C) from the Isis group after a battle with Iraqi soldiers at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq Fighters from the Isis aiming at advancing Iraqi troops at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq Fighters from the Isis group taking position at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq Fighters from the Isis group inspecting vehicles of the Iraqi army after they were seized at an undisclosed location near the border between Syria and Iraq In pictures: The rise of Isis Iraq One Iraqi captive, a corporal, is reluctant to say the slogan, and has to be shouted at repeatedly before he obeys Sky News In pictures: The rise of Isis Iraq Iraqi captives held by the extremists Sky News In pictures: The rise of Isis Iraq Iraqi captives held by the extremists Sky News In pictures: The rise of Isis Iraq Militants of the Isis group force captured Iraqi security forces members to the transport In pictures: The rise of Isis Iraq Militants of the Isis group transporting dozens of captured Iraqi security forces members to an unknown location in the Salaheddin province ahead of executing them In pictures: The rise of Isis Iraq A major offensive spearheaded by Isis but also involving supporters of executed dictator Saddam Hussein has overrun all of one province and chunks of three others In pictures: The rise of Isis Iraq Militants of the Isis group executing dozens of captured Iraqi security forces members at an unknown location in the Salaheddin province In pictures: The rise of Isis Iraq Isis militants taking position at a Iraqi border post on the Syrian-Iraqi border between the Iraqi Nineveh province and the Syrian town of Al-Hasakah In pictures: The rise of Isis Iraq Isis rebels show their flag after seizing an army post AFP/Getty Images In pictures: The rise of Isis Iraq Isis militants waving an Islamist flag after the seizure of an Iraqi army checkpoint in Salahuddin Getty Images In pictures: The rise of Isis Iraq Demonstrators chant slogans as they carry al-Qa’ida flags in front of the provincial government headquarters in Mosul, 225 miles (360 kilometers) northwest of Baghdad. In the week since it captured Iraq's second-largest city, Mosul, a Muslim extremist group has tried to win over residents and has stopped short of widely enforcing its strict brand of Islamic law, residents say. Churches remain unharmed and street cleaners are back at work

“It all depends on who liberates Fallujah, how it is liberated and when it is liberated,” says Fuad Hussein, chief of staff to the Kurdish President Massoud Barzani, in an interview with The Independent. He believes that the balance of power has shifted decisively against Isis compared with a year ago, but warns that nobody should imagine that the fall of Isis will bring peace and stability to the region.

He notes that Isis is suffering defeats but has also shown great powers of revival and reorganisation, citing as an example a recent attack by 400 Isis fighters and 20 armoured vehicles in which they penetrated the Peshmerga front line at an abandoned Christian village called Teleskof, 14 miles north of Mosul. What is different today compared with a year ago is that they were not able to exploit their local success before they came under air attack and lost between 200 and 250 fighters.

Fuad Hussein, the Kurdish President's chief of staff (Getty)

Mr Hussein says that if the caliphate falls, “Isis will transform from a terrorist state into a terrorist movement”. It will be weakened by not having secure bases for training but it will not evaporate or be replaced by moderate Arab Sunni politicians who claim great influence on their own community and are well-financed by foreign powers.

In Syria, a more likely successor to Isis would be the Syrian branch of al-Qaeda, Jabhat al-Nusra, which has been growing in popularity among Sunni Arabs. Though ideologically similar to Isis in its Salafi-jihadi fundamentalist beliefs, Nusra is presenting itself as a less maniacal alternative to Isis and one that can probably count on a measure of support from Turkey and Saudi Arabia.

Sunni Arabs as a whole have every reason to feel under threat. The great majority of the five million Syrian refugees come from Sunni Arab opposition areas. In Iraq they were reduced to holding a few enclaves in Baghdad in the 2006-7 sectarian bloodbath – “islands of fear” in the words of a US diplomat the time, a description that now fits almost every Sunni population centre in the country.

The governor of Kirkuk, Najmaldin Karim, told The Independent that there were 500,000 Internally Displaced Iraqis (IDPs), mostly Sunni Arabs who have sought refuge in his province. He ticks off why they cannot go home: they are banned from Diyala province north-east of Baghdad for sectarian reasons by the authorities there, from mixed communities in Salahudin province though they can go to districts that are wholly Sunni while Anbar is still too dangerous.

It may be that the enemies of Isis are dividing the lion’s skin before checking that it is truly dead or close to dying. The territorial losses of Isis may look impressive on a small scale map of Iraq and Syria, but what is impressive when driving outside the borders of the caliphate is how big it remains.

It has the advantage that its enemies are wholly disunited and detest each other almost as much as they hate Isis, if not more so. Turkey has failed to close Isis’s last access to the outside world west of the Euphrates and has prevented the Syrian Kurds doing so. Isis may be weakened, but its opponents are also fragile. The latest limited offensive by the Kurds to take back villages on the Nineveh Plain east of Mosul showed that these days they have the upper hand, but in reality the attack was delayed several days because some of the troops taking part had not been paid their salaries. The economy of the Kurdistan Regional Government area is in ruins.

An Isis fighter takes aim during battle with Iraqi forces near Fallujah (AP)

Isis is good at selecting vulnerable targets, in this case rebel groups backed by the US and Turkey in the north of Aleppo province who control the towns through which the rebel side of Aleppo used to be supplied. Isis fighters have been driving them backwards in recent days, gaining control over a larger section of the border and reinforcing their hold on the fertile and heavily populated countryside of north Aleppo province.

The Syrian army does not look as strong as it did when it was getting greater support from Russian air strikes and drove Isis out of Palmyra. Isis has been fighting back, capturing an important gas field and targeting civilians in cities famous for their loyalty to President Bashar al-Assad on Syria’s Mediterranean coast.

Iraq’s fight against ISIL hampered by divisions

In both Iraq and Syria, Isis is responding to military pressure by the mass slaughter of civilians, killing some 148 and injuring in the Syrian coastal cities of Tartus and Jableh and another 198 in a week of bombings in Baghdad. The purpose of these massacres is to show that Isis has not lost its strength and can still strike anywhere, while at the same time hoping to force Syrian and Iraqi regular forces to leave the front line to defend their civilian populations. It is an effective strategy that has generally worked in the past.

One of the many problems about ending the war is that many of the players have an interest in seeing it continue. Why, for instance, are there offensives against Isis by the Kurdish authorities and the Baghdad government this week? There are many reasons, but one important motive is that President Barzani and Iraqi Prime Minister Haider al-Abadi are presenting themselves as fighting Isis whole their local political opponents are demanding reform of corrupt and dysfunctional governments. “The main reason people here in Kurdistan are quiet and not protesting about the collapse of the economy and in their standard of living is that they are afraid of Daesh [Isis],” said a Kurdish businessman this week. President Assad benefits from having an enemy so monstrous as to rule it out as an alternative to himself and therefore secure him in power. Isis is a very convenient enemy for many of those fighting it, which may be one reason why it is so difficult to defeat.