Isis is close to capturing the Syrian Kurdish town of Kobani, just a short distance from the Turkish border, after a three-week siege in which US air strikes turned out to be ineffective in preventing Isis winning an important victory.

With Isis fighters also making advances into western Baghdad, which may allow them to close the city’s airport with artillery fire, President Obama’s strategy of containing the Islamic militants in Iraq and Syria is in ruins.

Kurdish militiamen are battling to stop Isis capturing Kobani, but a Kurdish spokesman in the city was quoted as saying that the town “will certainly fall soon”. Fighting has reached the eastern outskirts of Kobani where Isis fighters raised their black flag over one building at the entrance to the town.

Earlier the Kurds claimed a success when they drove Isis fighters from high ground overlooking the city called Mishtenur hill, but they appear to have lost it again. Some 3,000 civilians are believed still to be in Kobani, while 160,000 of its people have already fled.

A Kurdish female fighter called Deilar Kanj Khamis, better known by her military name, Arin Mirkan, blew herself up in the course of the fighting on Sunday, killing 10 jihadists. She had stayed behind as Kurdish forces withdrew and mingled with the attackers before detonating explosives.

The battle for Kobani has united Kurds across the region who see it as their version of the battle of Thermopylae, with their heroic soldiers fighting to the end against Isis forces superior in numbers and armed with heavier weapons.

Isis is using tanks and artillery it seized from the Iraqi and Syrian armies when it overran their bases during the summer.

Isis forces have also captured Hit in Anbar province and parts of the provincial capital Ramadi.

The successful advance of the militants shows that the Iraqi army is little more capable of resisting Isis than when it lost Mosul and Tikrit in June.

The ability of Isis to resume offensive operations may also be a sign that the effectiveness of US air power, without highly trained observers on the ground to call in air strikes, is limited when used against well-led forces.

A veteran Kurdish leader, Omar Sheikhmous, said that Isis “is saying that ‘we can still win victories on the ground’ and the capture of Kobani will give them complete control over territory stretching from Mosul to Aleppo.”

He said that Turkey had used the desperation of the Kurds in Kobani to extract political concessions from them before allowing reinforcements and supplies to reach the 2,000 to 3,000 fighters of the People’s Protection Units (YPG) who are holding the town.

The fall of Kobani would be a bad blow to the US and its anti-Isis coalition which has been bombing Isis positions in Syria since 23 September and in Iraq since 8 August.

But in both countries Isis is still on the offensive and is making gains in Anbar province in western Iraq and in towns close to Baghdad. Isis fighters have responded to air attacks by spreading out so they are difficult to find and target.

The YPG said that there were 50 clashes with the enemy on Sunday in which 74 Isis fighters, as well as 15 Kurdish militiamen, were killed.

Mr Sheikhmous said that, unlike the situation in Sinjar in Iraq, where Kurdish villages were overrun before their inhabitants could flee, the Kurdish local authorities had told civilians “to flee from their villages into Turkey because they could not defend them”.

Kobani is one of three Kurdish cantons on the Syrian side of the Turkish border where many of Syria’s two-and-a-half million Kurds live.

President Bashar al-Assad withdrew his forces from these enclaves earlier in the war, leaving them in the hands of the Democratic Unity Party (PYD) whose militia is the YPG. Both are effectively the Syrian branch of the PKK that has been fighting for Kurdish self-rule in Turkey since 1984.

ORDER IT NOW

The long-running peace process between the PKK and the Turkish government could be one casualty of the fall of Kobani. Turkish forces have done nothing to help the Syrian Kurds hold the town and there is no sign of powerful Turkish military forces along the border intervening.

The leader of the PYD, Salih Muslim, is reported to have met officials from Turkish military intelligence to plead for aid but was told this would only be available if the Syrian Kurds abandoned their claim for self-determination, gave up their self-governing cantons, and agreed to a Turkish buffer zone inside Syria. Mr Muslim turned down the demands and returned to Kobani.

President Recep Tayyip Erdogan has been expressing outrage that the US Vice-President Joe Biden should have identified Turkey, Saudi Arabia and the United Arab Emirates as the states whose military and financial support led to the growth of Isis and Jabhat al-Nusra.

Mr Biden told a meeting at Harvard University’s Institute of Politics on 2 October that the Turks, Saudis and UAE “poured hundreds of millions of dollars and tens of thousands of tons of weapons against anyone who would fight Assad, except that the people who were being supplied were al-Nusra and al-Qaeda and the extremist element of jihadis coming from other parts of the world.”

For all Mr Erdogan’s disclaimers, Turkey still evidently regards Isis as a lesser enemy than Assad.