When Isis first arrived in her village two years ago, Ameena, a 51-year-old Sunni Arab widow with three sons, was happy when they told people to pray. “I thought that they were real Muslims,” she recalls. “But after a few months they started poking their noses into all the details of people’s lives.”

Ameena, who comes from the village of Fatisah north of Isis’s de facto Syrian capital Raqqa, says that it was not only Isis’s emphasis on religion that explains their initial popularity but the fact that they were seen as part of the revolution against President Bashar al-Assad.

“When people in Syria started talking about toppling the regime, we were happy with any force trying to do this,” says Ameena. “But when those so-called saviours turned out to be criminals who killed people for any silly reason, we started to feel nostalgic for the old regime.” She has a strong personal reason for her anger against Isis: she accuses them of brainwashing her 15-year-old son and persuading him to join them. She has not seen him since he left home and does not know what has happened to him.

Ameena was speaking after Fatisah had been liberated by the Syrian Democratic Forces (SDF), a grouping strongly backed by the US that brings together Sunni Arab, Turkman and Christian paramilitaries – though its real military punching power comes from the Syrian-Kurdish People’s Mobilisation Units (YPG).

Isis may have gone from Fatisah but it has left many mines and booby traps, so Ameena is going to seek safety in the mixed Kurdish-Arab province of Hasaka to the north-east.

The SDF, supported by some 250 US troops, who specialise in calling in air strikes and logistics, started an operation a week ago with the aim of moving south from Ain Issa to take over the fertile cotton- and grain-growing land in the north of Raqqa province.

This will bring them very close to Raqqa city on the Euphrates river, which Isis seized from other Syrian rebel groups in August 2013. An agricultural and transport centre with a population of 200,000, the city had the advantage of being a road hub centrally placed within the “caliphate” that gave Isis a direct link to Mosul to the east, the Turkish border to the north and Aleppo to the west. Down river from two big dams and hydroelectric power stations on the Euphrates – Tishrin and al-Tabqa – it was at first well supplied with electricity, though the SDF has taken Tishrin earlier in the year and its columns are now advancing on al-Tabqa.

So far there has been limited fighting as Isis conserves its forces and pulls back out of the hundreds of villages in north Raqqa. The Syrian Observatory for Human Rights says it has lost 61 fighters in the last week including a French commander and 24 children called “the Caliphate’s Cubs”. Isis strategy in Syria and Iraq is evidently to trade territory for time and prepare for a long guerrilla war without exposing its experienced fighters to the devastating firepower of the US-led coalition of air forces.

But military logic is not the only consideration here because it would be politically damaging for Isis to give up too easily the last three big cities – Raqqa, Fallujah and Mosul – it holds in Syria and Iraq. In any case, people in the north Raqqa countryside are taking no chances and are leaving their villages to avoid the fighting, though in Raqqa city they do not have this option. Isis is preventing them fleeing in the hope of forcing the coalition – overwhelmingly American in the case of Syria where the US has carried out all but 235 out of 3,715 air strikes – to limit its bombardment to avoid civilian casualties.

People in villages liberated by the SDF give graphic descriptions of what it was like to live under Isis rule for the last two-and-half years. For reasons that Ameena came to understand all too well, many were worried that their teenage sons would be lured by Isis propaganda into volunteering to fight and die for the the group.

Jasem al-Ahmad, 42, a Sunni Arab from Hesha village north of Raqqa, was so concerned about his 15-year-old son that last year he sent him to relatives in Hasaka. He says that “it was not permitted for anybody to leave the region under Isis rule, but I got a smuggler to take him out of the village”.

Isis gave priority to indoctrinating the youth of the city. Mr Ahmad says that the previous educational curriculum was cancelled and replaced by religious courses which were obligatory for children and the young, and were held in special centres in the villages and in Raqqa. “When they join the religious courses, they are called Lions of the Caliphate,” says Mr Ahmad. “In general, people were not happy with these courses so they tried to keep their children at home.”

As elsewhere in Isis territory, personal behaviour and appearance were regulated by severe punishments, starting with fines but rapidly graduating for repeat offenders to whipping. For un-Islamic shaving practices the penalty was a fine of $25 (£17) to $30, 30 lashes with a whip, and attendance at a religious course for 45 days. The whip used was either an electric cable or a thin slice from a tyre with a metal wire inside it.

Mr Ahmad’s experience is worth quoting at length because it gives a frightening insight into life lived under the constant threat of physical punishment. “Once I was caught smoking,” he says. “They asked me to pay $10 and I answered that I did not have it. They decided to give me 30 lashes with a whip. I had the punishment and with the 20th lash I fainted. My cousin took me to the clinic and I stayed there for more than two weeks suffering from the pain and the wounds.”

ORDER IT NOW

Isis began its rule in this well-irrigated agricultural area by offering a range of services to farmers such as fertilisers, pesticides and veterinary assistance. But as Isis’s income from oil sales fell, it increased taxes and fees, particularly over the past eight months. It demanded that people pay in dollars as the Syrian pound fell sharply in value. Control of the big dams meant that electricity was widely available, but Isis charged high prices for it.

A feature of Isis control, which makes outright opposition difficult and dangerous, is that it is merciless towards any type of individual or communal resistance. Six months ago people in a village described as being near Hutteen state farm, 12 miles north of Raqqa, tried to prevent Isis fighters taking away a local man for punishment in Raqqa. Isis called for reinforcements who besieged the village and eventually arrested 235 people, most of its population, some whom were detained for a month and freed and others who are still in jail.

A further intriguing development is that villagers say that in recent days there have been differences and even clashes between local and foreign members of Isis over how to respond to the SDF offensive. The local Isis fighters generally want to withdraw, possibly because they do not want to see their villages destroyed, while the foreigners, who are described as being mostly Saudi and Libyan, wanted to stay and fight.

Isis is being pressed back on many different fronts but it can still counterattack briskly and effectively, as it showed in recent fighting north of Aleppo. It has defeated armed opposition groups backed by the US and Turkey and expanded the section of the Turkish border it controls and gives greater access to the outside world, though not on the scale it enjoyed two years ago. It wants to maintain its rule in heavily populated a fertile areas of north Aleppo province, which has a population of about 700,000, from which it can draw supplies and manpower.

But its overall position is deteriorating sharply as it loses more and more of the Euphrates valley that used to be the spinal column of the “Caliphate” stretching from Fallujah west of Baghdad in the south to Jarabulus on the Syrian-Turkish border. It also faces a more active front with the Syrian army backed by the Russians that at one stage appeared capable of pressing east from Palmyra towards Raqqa and seizing it before the SDF.

Overall Isis commanders can still counterattack but they have not found a new set of tactics to replace those made obsolete by coalition and Russian air power.

Isis’s position is weakening, but reports from displaced or recently liberated Syrians and Iraqis complaining about their grim life under the its rule must be taken with a pinch of salt and can be misleading about the real state of public opinion. People escaping from Isis and wishing to persuade suspicious new hosts that they are not Isis secret agents have every incentive to stress the degree to which they and their neigbours have always detested it.

Most importantly, all those in authority in all parts of Syria and Iraq are highly unpopular with their own people, to whom they have brought only violence and ruin. This is true of Isis, but it is also true of the Iraqi, Syrian and Kurdish governments. Their people only support them, in so far as they do, because they fear that the only alternative rulers available will be worse and be even more dangerous to themselves, their families and their communities.

Patrick Cockburn is the author of ‘Chaos and Caliphate: Jihadis and the West in the Struggle for the Middle East’, published by OR Books (orbooks.com), £18. Readers can obtain a 15 per cent discount by using the code: INDEPENDENT