The Syrian soldiers in this dust-covered, rubbelised town don’t smile very much and their battle fatigue is obvious. They wear an assortment of T-shirts and scarves and black headbands – not unlike their Isis enemies -- and when a radio crackles the news that an officer has been killed by a mine in a neighbouring village, they show no immediate reaction. Combat troops don’t look like the men at headquarters with their neat uniforms and clip-boards and strategic explanations. But in Deir Hafer, these Syrian soldiers are lucky. Twelve hours ago, their Isis enemies – rather than fighting to the death -- suddenly fled for their lives.

The crushed buildings and flattened houses of this empty provincial town on the highway to Raqqa show just what happened. The Syrian and Russian jets tore the place to bits and then the Syrian army swept in so fast from either side that Isis had time only to abandon their front line. Over three weeks, they had fought off the Syrians with suicide trucks and from a vast network of trenches on each side of the motorway and then – unlike their comrades in the streets of Mosul far to the east – they ran for their lives. An astounding thought. Did the lives of Isis men actually matter after all? Had the death cult of the 'Caliphate' in this place of desolation suddenly collapsed?

The Syrian soldiers were amazed. They had fought the cruellest army in the world and they had won. Some of the soldiers were local men who had themselves lived in secret here under Isis rule and crept out of Deir Hafer to rejoin their army and then fought to liberate their own homes. They had seen the Caliphate with their own eyes and some of them had suffered for it. No wonder they didn’t smile or joke the way soldiers often do when they’ve survived a battle. They were absorbing the one crucial lesson of all who face Isis: that you can beat them.

So these soldiers wearily took the only foreign journalist in the town – or what’s left of it – to the bureaucracy of death which Isis left behind: the hastily abandoned execution “courts”, the vile, dark, black-painted prisons, the vast heaps of files thrown to the floor with such carelessness that I could pick up just one piece of paper and read that Hassan al-Khalef al-Mustafa Ibn Osman stole farm cereals from a government building and then attacked an Isis “Mujahid” fighter, for which he was sent to the Special Legal Sharia Court after being charged with “breaking the rule of God”. Poor Ibn Osman. I fear he was taken to the iron execution platform -- black-painted, of course, the metal floor sheets loose fitting and rumbling with menace beneath your feet, the last sound the condemned man must have heard -- which stands scarcely 12 metres from the grubby room in which his judges sat.

I found a Syrian soldier standing beside it, eyes narrowed, a black scarf round his forehead, who told his story bleakly and without prompting. “My cousin was executed here,” he said. “He was Bassem Hassan al-Khalouf. When he and 11 others thought the Syrian army was coming last year, they flew the Syrian flag from the roof of a house. ‘Da’esh’ [Isis] arrested eight of them. The others managed to run away. They were tortured. And then they were executed. They were shot here, and after they were killed, their bodies were hanged on this platform for three days to terrify the people. After this, I managed to escape from Deir Hafer and to come back today as a soldier.”

There is room for four corpses to be hanged around the execution platform. I’m growing used to these repulsive things in each town the Syrian army takes back from Isis. So, no doubt, did the people of Deir Hafer grow used to it, some of whom – God spare them, I suppose we must say – obviously gave their support to Isis at the beginning of its three-year occupation. Deir Hafer is a Sunni town and the tribes who lived here and in the 27 newly liberated villages around have just sent an appeal for “reconciliation” to the army – that word “reconciliation” again, with its combination of grovelling sorrow and special pleading – and the army have sent the petition on to the regime authorities in Aleppo city.

Of course, Isis might try to return – as it did, shockingly, to Palmyra after the ancient city’s first “liberation” – but the Syrian military campaign here appears to be on a far larger scale. They attacked Isis from two sides – no frontal attack is worth the casualties, the Syrians have decided – but for all the captured American equipment Isis is able to deploy in Iraq, its artillery outside Deir Hafer appears to have been a single and highly eccentric gun which the soldiers inspected here with growing incredulity. It appears to be a Russian-made T-62 tank barrel welded onto the chassis of a French Second World War artillery piece.

But such details should not detract from the dark world which lay uncovered in Deir Hafer. Its message was prayer and death and best described, perhaps, in consecutive order as we prowled round the wreckage of this horrible place, the distant thump of explosions from the new front line down the motorway echoing through the shattered streets. The familiar Isis logo of “Allah, the Prophet Mohamed” in black paint on a white background drips from every wall, often from every building in a street. The highway underpass is decorated with quotations from the Quran.

“The essence of religion is a book which leads you,” is painted on a wall close to the Isis religious court. You walk through a broken doorway into a series of rooms, all black-painted, decorated only with further religious quotations. “You who terrorise the enemy,” it says, “will be recorded as a martyr by the girls of paradise.” And you suddenly realise that the judges must have regarded themselves as those who terrorised their enemies. For them the girls of paradise. Most of the judges, according to the executed al-Khalouf’s cousin, were Egyptians.

It’s a small room with some overturned chairs and a heap of documents containing the names of litigants – some families here, it seems, used Isis courts to settle scores against their old enemies from pre-war days – and those whose presence was demanded before the judges. Thus Shawkat al-Kurah Ali al-Haj Obeid, uncle of Abdullah bin Mohamed who lives in Kiarieh “is instructed to be present at the office of the Islamic police in Deir Hafer on 8 May 2014 at 9.00am and any delay or refusal [to be present] will be punished. The investigating judge will be Abdul Hamid al-Ghaif.”

Outside is a sunken room above which is written – I need not mention the colour black any more – “Room of the legal judge”. There are pamphlets of sharia rulings – in colour and printed, I note, in the Saudi capital of Riyadh – and a dirty old desk-top computer and printer. Here’s another sinister accusation paper on the floor, in which "Mojahid" Ahmad Abu Obeidi of the "Free Revolutionary Police" in Deir Hafer accuses a Syrian refugee called Ali, newly returned from Lebanon, of meeting at night with a local girl, of pretending to go to evening prayers when in fact he was seeing a woman. Ali, we are told, “confessed”.

Just next door is the prison. It has cells above and below ground without lights and a filthy cement lavatory and a single quotation on the wall: “If people want life, their faith will respond to them.” The doors are of thick iron, there are padlocks on the floor. Across a courtyard now smashed by Syrian and Russian bombs is another prison. More iron doors. And then up the road is a school which was turned into a recruitment centre – yes, this means that civilians of Deir Hafer did collaborate – but the desks are missing. So are the schoolbooks. Education is not part of the Isis faith.

Half a mile away stands the headquarters of the local agriculture department, its broken cranes and trucks standing forlornly beside what should have been a granary or a warehouse. But it is a weapons factory. There are newly-minted shells and mortars and anti-personnel mines and rockets and piles of metal tubes. Several professionally-made artillery rounds are displayed on tables – clearly, they are models for the Isis manufacturers to copy. They must learn their craft from the state-of-the-art explosives which we in the West – or in Russia – first create.

Beneath the motorway, there is a field hospital for Isis fighters with yet more huge Isis logos and Koranic inscriptions and bits of syringes. “Dar al-Fatah”, it says above the concrete door. This is “The House of God” it states. And here is a surprise, a pile of glossy magazines published by the Free Syrian Army, the so-called moderate rebels of whom David Cameron once spoke with admiration. Why did Isis indulge the hopeless FSA militia with all its western connections by stockpiling its magazines? And why, for that matter, were some of the court documents apparently written out under FSA titles?

It’s all part of a story which the Syrian government likes to tell; that there is no difference between Isis and the FSA and Nusra/al-Qaeda or any other group and that other foreigners in Deir Hafer included Tunisians and Chechens. And they may have a point. These battles also prove the lie of that constant US claim that the Syrian army does not fight Isis. But the real message of Deir Hafer is one which we all know, but which we probably need to see in order to believe.