There are strong analogies between Ireland and Iraq. Both fought a revolution in the early 1920s to rid themselves of the British. Both settled down temporarily with an Anglo-Irish Agreement in 1921 and with an Anglo-Iraqi agreement the same year which installed a monarchy..

Both settlements were the source of future discontent and troubles. Ireland eventually got its act together with the Good Friday Agreement, which gave succor to all sides and brought an uneasy but sustained peace. Iraq went from one disaster to another to the complete implosion we are witnessing today.

Like the Irish border, Iraq's boundary was also arbitrarily drawn up following the Sykes-Picot agreement in 1921 after the Iraqi revolt by natives, both Sunni and Shiite, who joined together to fight for freedom against the British.

The subsequent agreement which created Iraq was the divvying up of the spoils of the old and defeated Ottoman empire between Britain, France and with Russia acquiescing. That division, like Ireland’s partition, is the basis for all the troubles in that region today.

Because there were no histories of democracy the army in Iraq eventually became all powerful and ruled with an iron fist but maintained a secular society. Saddam Hussein was, of course, the embodiment of that despotic rule. Sunnis dominated the top jobs and the army, somewhat like the unionists in Northern Ireland after partition. Shiites were deeply unhappy but had little choice like Catholics in the North.

Then came the US invasions.

The first was 1991 when Iraq invaded Kuwait, an ally of the US. George Bush Senior put together a global coalition and defeated Saddam but kept him in power, fearing the consequences of a leaderless Iraq. He has proved a visionary.

Secretary of State John Kerry is said to have stated that the second US invasion of Iraq in 2003, ordered by the second President George Bush, was the greatest foreign policy disaster in American history.

As we look at the world 13 years later it is hard to disagree with that statement, especially with the horrible events in Orlando at the weekend and the dreadful conflicts in Syria and Iraq.

Yes, there is a direct line between Orlando and the mistakes made back in 2003. Everything the US, like the British before them, has touched in the area has turned to dust and we are witnessing domestic terrorism as seen in San Bernadino,in Paris and now Orlando which may only ratchet up in the future.

America, alas, did much of the damage to itself. In the same way Al Qaeda was originally created by the United States so too was ISIS. It is an inconvenient truth, but it brings to mind the old Churchill maxim that it is easy to start a war but nearly impossible to end it.

As we look at the Middle East today, Syria is the most violent place in the world, Afghanistan is aflame, Iraq is in the middle of a huge fight for supremacy, it is hard to deny.

Al Qaeda came about when the CIA armed militant Islamic fighters, paid for by Saudi Arabia, to battle the Russian forces in Afghanistan after Russia had invaded in 1979.

Back then, the realpolitik was to stop Russia in its tracks by whatever means and militant Islamists, including a young warrior called Osama Bin Laden, provided the perfect proxy army.

We created ISIS too in 2003 after the invasion. We dismantled Saddam Hussein’s secular state including his army, removed Sunnis from key positions all over the government but especially the army and replaced them with a sectarian Shiite junta which immediately approved of banning all the Sunnis from the army, took all their possessions and drove them into despair.

Out of that despair came disgruntled Sunnis who formed Al Qaeda in Iraq in 2010 which later changed its name to ISIS or ISIL as some call it.’The rebranding has been incredibly successful, scaring the bejaysus ever since out of every western country and with good reason.

If the Bush regime had carried out in Iraq what Mandela did in South Africa, where he let the white farmers keep their land, sustain their prosperity and integrated them as much as possible into the new country, there would have been a very different outcome. Indeed if they had done what George Mitchell did in Ireland and insured that all sides felt taken care of, we would have no ISIS.

There was a reason George Bush senior left Saddam in power after the first Gulf War: he realized that Saddam was a necessary counterweight to Iran’s expansionist ambitions and it was necessary to keep the entity called Iraq together.

Without the Iraq bulwark and with fellow Shiites secure in power in Baghdad, the Iranians can hardly believe their luck.They are now undisputed bosses of the region.

In addition to Iraq there are now three wars being waged in Syria: one between Assad and the rebels, another between Iran and Saudi Arabia, and yet another between America and Russia.

With no end in sight and no viable solution obvious it looks like a very dangerous moment for the world.

War between countries are usually, at some point, terminated when the need for a solution becomes overwhelming.

However, in the case of asymmetric rebel forces, no such need for solutions is obvious. Anyone studying Afghanistan would have to assume the local Taliban is fighting – at some level – because they enjoy it and can get rich from it with opium shipments.

And it may only get worse. Did you know America is currently arming Islamist rebels in Syria and that some of them are ISIS regulars who regularly show off their American submachine guns? It seems the more things change the more they stay the same.

In fairness to Trump, he could hardly make a bigger mess than Bush Junior did of the entire region. Then again maybe he could. Orlando is a chilling warning shot of what may lie ahead.

After Orlando slaughter tough questions need to be asked on how we got here.Getty Images/iStockphoto