Little has been done to end the four-year civil war that is destroying Iraq and Syria and which has caused the biggest mass flight of people ever seen in the Middle East. More than half of the 23 million Syrian population have fled their homes, of which four million are refugees outside Syria. There is a growing exodus from Iraq, with three million people displaced, many of whom today see that the war is not ending and that they can never again hope to live safely in their own country.

The Iraq-Syrian war is the cause of the European Union’s refugee crisis and it is going to get worse. There is a bloody stalemate in Iraq, with the country divided by military front lines more heavily defended than the frontiers of the state. The Sunni Arabs are suffering particularly badly because they are being forced to leave the previously mixed provinces around Baghdad, where they are suspected of sympathising with Islamic State (ISIS). They are unlikely to be able to return. Others flee provinces such as Anbar, Nineveh and Salahuddin to escape the fighting.

There are accusations of ethnic or sectarian cleansing by Shia militias against Sunni or by the Syrian Kurds against Arabs in areas under Kurdish control. ISIS pumps up communal hatred by its daily bombings of civilian targets. But at this stage in the war every community is so terrified of its traditional enemies that its members will run away rather than risk an uncertain fate under occupation. The Syrian Kurdish authorities are worried about whole districts becoming deserted as their inhabitants leave for the EU. ISIS acted similarly last year, giving absent home-owners 10 days to return or lose their property.

Newly arrived Syrian Kurdish refugees stand at the back of a truck after crossing into Turkey from the Syrian border town Kobani, near the southeastern Turkish town of Suruc in Sanliurfa province

The war in Syria and Iraq has now gone on about as long as the First World War in Europe a century ago. Calamity though it is, efforts to end the conflict other than by military victory have been episodic and ineffective. Western powers such as the US, UK and France, along with regional allies such as Saudi Arabia, Turkey and Qatar, grossly miscalculated in 2011, believing that President Bashar al-Assad would fall as swiftly as Muammar Gaddafi in Libya. They were not unduly concerned when this mistake became obvious, because they were convinced that the war in Syria could be contained, and failed to see that it would destabilise the precarious peace in Iraq.

Even as barbaric sectarian war tore apart Iraq and Syria, Western powers showed a curious detachment and lack of urgency when it came to restoring peace. It is still too early to say if this lackadaisical attitude has been changed by the arrival of desperate refugees battering at the gates of the EU. Previously, it was revealing that US Secretary of State John Kerry had devoted much more time to a patently doomed attempt to get Palestinian-Israeli negotiations under way than he had to ending the Iraq-Syrian war.

This insouciance is surprising until one takes on board that it is in keeping with Western attitudes to the transformation of the political landscape in the wider Middle East and North Africa since the end of the Cold War. There are now no less than nine ethnic, sectarian or separatist civil wars being waged in the vast area between Pakistan and Nigeria. Some conflicts are well known, such as the war in Afghanistan or the bloody raids of Boko Haram in north-east Nigeria, but who notices that 1.5 million people have been displaced in South Sudan since fighting resumed there in 2013, or that Khartoum has become a city state with only feeble control over much of the rest of Sudan?

This implosion of so many states could not have happened during the Cold War because the US or Soviet Union knew that such instability would offer an opportunity to the other superpower. Washington or Moscow would prop up ailing regimes and those regimes could barter their allegiance in order to achieve a degree of self-determination. Since the collapse of the Soviet Union in 1991, the Western powers no longer see their vital interests as being affected by the collapse of countries such as Libya or Iraq. It is noticeable that anarchy in these two countries has little effect on the price of oil, though both countries are important producers.

Another sinister development during this era of “globalisation” and neo-liberal, free-market economics has had explosive consequences. Nationalism, national self-determination and national control of natural resources has been at a discount. But the nation state played a positive role in bringing peace and security to this region, even when it took the form of secular dictatorships.

As loyalty to these states disintegrates, it is being replaced by more primitive but powerful ethnic and sectarian allegiances. For instance, there are few people who will fight and die for Iraq, but many who will do so for the Kurdish, Shia or Sunni communities.

Free-market economics in these countries has given ideological justification for governments abandoning efforts to guarantee some sort of economic security for the population. Where power and wealth is monopolised by the ruling elite, all capitalism becomes crony capitalism and state machinery a means for officials to make money.

In Syria before 2011, for instance, central Damascus had become a delightful place to live, with wonderful restaurants and shops, but at the same time, in north-east Syria, there was a catastrophic three-year drought which the government did nothing to alleviate and which drove three million Syrians to flee to shanty towns on the outskirts of the larger cities.

Many of these places subsequently became hard-core rebel strongholds that are now shattered by government bombing and shelling.

Take another disastrous example of unthinking adherence to free-market capitalism in countries with no rule of law, rampant corruption and a dysfunctional state. In June 2014, just after the capture of Mosul by ISIS, I asked a recently retired Iraqi Army four-star general what was wrong with the army, and why it had disintegrated when attacked by a much inferior force. “Corruption! Corruption! Corruption!” he replied emphatically, explaining that he blamed the way in which the Americans had created the post-Saddam Hussein Iraqi Army.

To encourage free-market capitalism the Americans had laid down that all food and other non-military supplies for the army should be contracted out to private business. This had the effect of making it in the interests of every colonel, who was being paid to feed a unit of 600 soldiers, to reduce the real number of men to 150 and pocket the money to feed, clothe and equip the other 450 who did not exist. The Iraqi government admitted later the existence of 50,000 such “ghost” soldiers, but the real figure was probably much higher.