The film is being widely watched on YouTube by Syrians, reinforcing their fears that Syria is imitating Iraq’s descent into murderous warfare in the years after the US invasion in 2003. It fosters a belief among Syria’s non-Sunni Muslim minorities, and Sunnis associated with the government as soldiers or civil servants, that there will be no safe future for them in Syria if the rebels win. In one version of the video, several of which are circulating, the men who are beheaded are identified as officers belonging to the 2.5 million-strong Alawite community. This is the Shia sect to which President Bashar al-Assad and core members of his regime belong. The beheadings, so proudly filmed by the perpetrators, may well convince them that they have no alternative but to fight to the end.

The video underlines a startling contradiction in the policy of the US and its allies. In the past week, 130 countries have recognised the National Coalition of Syrian Revolutionary and Opposition Forces as the legitimate representatives of the Syrian people. But, at the same time, the US has denounced the al-Nusra Front, the most effective fighting force of the rebels, as being terrorists and an al-Qa’ida affiliate. Paradoxically, the US makes almost exactly same allegations of terrorism against al-Nusra as does the Syrian government. Even more bizarrely, though so many states now recognise the National Coalition as the legitimate representative of the Syrian people, it is unclear if the rebels inside Syria do so. Angry crowds in rebel-held areas of northern Syria on Friday chanted “we are all al-Nusra” as they demonstrated against the US decision.

Videos posted on YouTube play such a central role in the propaganda war in Syria that questions always have to be asked about their authenticity and origin. In the case of the beheading video, the details look all too convincing. Nadim Houry, the deputy director for Human Rights Watch in the Middle East and North Africa, has watched the video many times to identify the circumstances, perpetrators and location where the killings took place. He has no doubts about its overall authenticity, but says that mention of one district suggests it might be in Deir el-Zhor (in eastern Syria). But people in the area immediately north of Homs are adamant the beheadings took place there. The victims have not been identified. The first time a version of the film was shown was on pro-government Sama TV on 26 November, but it has been widely viewed on YouTube in Syria only over the past week.

The film begins by showing two middle-aged men handcuffed together sitting on a settee in a house, surrounded by their captors who sometimes slap and beat them. They are taken outside into the street. A man in a black shirt is manhandled and kicked into lying down with his head on a concrete block. A boy, who looks to be about 11 or 12 years old, cuts at his neck with a machete, but does not quite sever it. Later a man finishes the job and cuts the head off. The second man in a blue shirt is also forced to lie with his head on a block and is beheaded. The heads are brandished in front of the camera and later laid on top of the bodies. The boy smiles as he poses with a rifle beside a headless corpse.

The execution video is very similar to those once made by al-Qa’ida in Iraq to demonstrate their mercilessness towards their enemies. This is scarcely surprising since many of the most experienced al-Nusra fighters boast that they have until recently been fighting the predominantly Shia government of Iraq as part of the local franchise of al-Qa’ida franchise. Their agenda is wholly sectarian, and they have shown greater enthusiasm for slaughtering Shias, often with bombs detonated in the middle of crowds in markets or outside mosques, than for fighting Americans.

The Syrian uprising, which began in March 2011, was not always so bloodthirsty or so dominated by the Sunnis who make up 70 per cent of the 23 million-strong Syrian population. At first, demonstrations were peaceful and the central demands of the protesters were for democratic rule and human rights as opposed to a violent, arbitrary and autocratic government. There are Syrians who claim that the people against the regime remains to this day the central feature of the uprising, but there is compelling evidence that the movement has slid towards sectarian Islamic fundamentalism intent on waging holy war.

The execution video is the most graphic illustration of deepening religious bigotry on the part of the rebels, but it is not the only one. Another recent video shows Free Syrian Army fighters burning and desecrating a Shia husseiniyah (a religious meeting house similar to a mosque) in Idlib in northern Syria. They chant prayers of victory as they set fire to the building, set fire to flags used in Shia religious processions and stamp on religious pictures. If the FSA were to repeat this assault on a revered Shia shrine such as the Sayyida Zeinab mosque in Damascus, to which Iranian and Iraqi pilgrims have flooded in the past and which is now almost encircled by rebels, then there could be an explosion of religious hatred and strife between Sunni and Shia across the Middle East. Iraqi observers warn that it was the destruction of the Shia shrine in Samarra, north of Baghdad, by an al-Qa’ida bomb in 2006 that detonated a sectarian war in which tens of thousands died.

The analogy with Iraq is troubling for the US and British governments. They and their allies are eager for Syria to avoid repeating the disastrous mistakes they made during the Iraqi occupation. Ideally, they would like to remove the regime, getting rid of Bashar al-Assad and the present leadership, but not dissolving the government machinery or introducing revolutionary change as they did in Baghdad by transferring power from the Sunnis to the Shia and the Kurds. This provoked a furious counter-reaction from Baathists and Sunnis who found themselves marginalised and economically impoverished.

Washington wants Assad out, but is having difficulty riding the Sunni revolutionary tiger. The Western powers have long hoped for a split in the Syrian elite, but so far there is little sign of this happening. “If you take defections as a measure of political cohesion, then there haven’t been any serious ones,” said a diplomat in Damascus.

Syria today resembles Iraq nine years ago in another disturbing respect. I have now been in Damascus for 10 days, and every day I am struck by the fact that the situation in areas of Syria I have visited is wholly different from the picture given to the world both by foreign leaders and by the foreign media. The last time I felt like this was in Baghdad in late 2003, when every Iraqi knew the US-led occupation was proving a disaster just as George W Bush, Tony Blair and much of the foreign media were painting a picture of progress towards stability and democracy under the wise tutelage of Washington and its carefully chosen Iraqi acolytes.

The picture of Syria most common believed abroad is of the rebels closing in on the capital as the Assad government faces defeat in weeks or, at most, a few months. The Secretary General of Nato, Anders Fogh Rasmussen, said last week that the regime is “approaching collapse”. The foreign media consensus is that the rebels are making sweeping gains on all fronts and the end may be nigh. But when one reaches Damascus, it is to discover that the best informed Syrians and foreign diplomats say, on the contrary, that the most recent rebel attacks in the capital had been thrown back by a government counteroffensive. They say that the rebel territorial advances, which fuelled speculation abroad that the Syrian government might implode, are partly explained by a new Syrian army strategy to pull back from indefensible outposts and bases and concentrate troops in cities and towns.

At times, Damascus resounds with the boom of artillery fire and the occasional car bomb, but it is not besieged. I drove 160 kilometres north to Homs, Syria’s third largest city with a population of 2.3 million, without difficulty. Homs, once the heart of the uprising, is in the hands of the government, aside from the Old City, which is held by the FSA. Strongholds of the FSA in Damascus have been battered by shellfire and most of their inhabitants have fled to other parts of the capital. The director of the 1,000-bed Tishreen military hospital covering much of southern Syria told me that he received 15 to 20 soldiers wounded every day, of whom about 20 per cent died. This casualty rate indicates sniping, assassinations and small-scale ambushes, but not a fight to the finish.

This does not mean that the government is in a happy position. It has been unable to recapture southern Aleppo or the Old City in Homs. It does not have the troops to garrison permanently parts of Damascus it has retaken. Its overall diplomatic and military position is slowly eroding and the odds against it are lengthening, but it is a long way from total defeat, unless there is direct military intervention by foreign powers, as in Libya or Iraq, and this does not seem likely.

This misperception of the reality on the ground in Syria is fuelled in part by propaganda, but more especially by inaccurate and misleading reporting by the media where bias towards the rebels and against the government is unsurpassed since the height of the Cold War. Exaggerated notions are given of rebel strength and popularity. The Syrian government is partially responsible for this. By excluding all but a few foreign journalists, the regime has created a vacuum of information that is naturally filled by its enemies. In the event, a basically false and propagandistic account of events in Syria has been created by a foreign media credulous in using pro-opposition sources as if they were objective reporting.

The execution video is a case in point. I have not met a Syrian in Damascus who has not seen it. It is having great influence on how Syrians judge their future, but the mainstream media outside Syria has scarcely mentioned it. Some may be repulsed by its casual savagery, but more probably it is not shown because it contradicts so much of what foreign leaders and reporters claim is happening here.

PATRICK COCKBURN is the author of “Muqtada: Muqtada Al-Sadr, the Shia Revival, and the Struggle for Iraq.