Matthew Glanville is a former special advisor to the Governor of Anbar province (in what is now the “Islamic State” in Iraq). Previously, he fought in Iraq in 2006 with the British Army before returning in 2008 as an adviser to the American military.

It is time to discover what has gone wrong in Iraq – not merely why, post-withdrawal, we are witnessing genocide, but how Western nations’ policies went so awry that we didn’t even know it was likely to happen.

British activity in the Middle East used to be based on a deep understanding of the area and the peoples. So the surprise that this situation has caused raises questions: where is our intelligence? Why was a fairly predictable mass Sunni uprising not prepared for by either the US or UK governments? Why were we not warned? Why were we not ready?

Understanding history is important, if unfashionable. However, one doesn’t have to go back a thousand years to understand the current crisis. Since 2010, there was a deterioration of relations between the Sunni areas broadly to the west and north of Baghdad and his Government. The problems were exacerbated by the situation in Syria.  IS fed on Sunni resentment in Iraq and the chaos in Syria.

The idea that we have no intelligence networks able to operate in the Sunni areas is very worrying. I  understand the focus on domestic terrorism, but without any significant understanding of the religious, tribal and political background we will never be able to control terrorism at its sources.

Large areas of Anbar have been held by militant Sunnis since the spring of last year; a fact seemingly ignored by our media and governments. Iraqi Government offensives petered out in the face of local support for the jihadis. This was a clear harbinger of what was to come in Mosul. None of this would have been a surprise if we had anybody from the Foreign Office or the intelligence services there on the ground, or even who just read the local newspapers.

The strictly domestic focus on the UK’s security betrays our short-term thinking. Agents are put into jihadi organisations to provide information on UK plots, but where are our Anglo-Arab sources of information on the Middle East itself? America has a large Iraqi diaspora, for example in Dearborn, Michigan, and we have Iraqis all over the UK. How is it that our governments seemed surprised by the IS phenomenon?  The exclusive focus on returning jihadis is understandable, but if a similar effort was put into intelligence in Iraq or Syria we might well not be in this position.

This is not an argument about money. Indeed, last month the military was given £1.1 billion for increased surveillance, signals intelligence and related Special Forces capacity. It is, rather, an argument about risk and our Government’s desire for simple solutions. It is much neater (and safer) to fly drones or rely on signals intelligence, but what is needed is people willing to risk themselves to get decent human intelligence and, crucially, a governmental class that will listen to those people.

When we invaded Iraq in 2003, it is said that the US and Britain did not have one reliable agent in Iraq. During the Cold War, we had large networks in places behind the Iron Curtain; countries that were just as difficult to operate in as Saddam’s Iraq. Many of the people involved were motivated largely by a genuine respect for Western democratic values. We seem to have lost the ability to inspire such figures in the Middle East through a confident articulation of our values.

It is unforgivable that we then cannot come up with any considered long-term policy response. The US has now started to ship hellfire missiles, and air strikes are now taking place, but with basic intelligence about what was going on outside of Baghdad neither would have been needed. The British Embassy staff in Iraq is not badly informed on the intricacies of Green Zone Baghdad politics, but has very little knowledge of life outside the capital or even beyond its own small, protected enclave. They used to ask me what was going on in town.

We spend billions through DFID and the FCO in a variety of countries, but seem to develop neither political influence nor political understanding. We may even recently no have longer have global power, but at least we continued to have global intelligence: today, we don’t seem to have either.