Nadhim Zahawi is MP for Stratford on Avon.

I was in Baghdad after the fall of Saddam, helping to conduct polling work on behalf of the new Iraqi government. This was a novel concept in a state which had never had to consult public opinion before. I remember driving up the great highway which links Kuwait to the capital and seeing the massed logistical force of the US military: a never-ending convoy of troops, tanks, trucks and contractors stretching off into the horizon.

They were bringing in the raw materials of nation-building, a brand new state in flat-pack form, ready to be assembled on the ruins of Saddam’s Iraq.

This approach to foreign policy has since been discredited, and rightly so. Without a lasting political settlement invading, deposing, flooding the place with money, then getting the hell out is no help at all.

But today there’s a danger that the pendulum has swung too far the other way. Now we do the bare minimum, acting piecemeal and always reactively. We can see this in the conflict with ISIS. Despite the warnings of regional allies, the capture of Mosul took Western governments by surprise. Our response to date has been a few airstrikes and some small arms grudgingly supplied to the Kurds.

This approach doesn’t deliver results, leaves our regional allies high and dry and helps feed the Middle East’s vast conspiracy theory industry. On the Arab street, the word today is that the West itself is behind ISIS’s recent victories – that we’re employing the classic colonial tactic of divide and rule.

We need a new approach to foreign policy, one which recognises that though we can’t design the world in our own image we’re not powerless to influence events, that’s it’s still possible to play a constructive role through intelligent long-term engagement.

This requires three things.

First, we need to play to our strengths. We can’t act alone, but we do have a unique position in international diplomacy: as the closet ally of the world’s only superpower, with disproportionate soft power and one of the finest diplomatic services in the world.  We need to make the most of those advantages.

As I argued in my last column, that means a properly resourced FCO: ensuring our diplomats have the time and skills to immerse themselves in local knowledge, so they can provide the best possible advice. It also means ensuring that the transatlantic partnership is a genuine dialogue. In 2003 our support for the Iraq campaign should have been entirely conditional on seeing a serious and realistic plan for the post-Saddam political order. As someone who was there on the ground, I can tell you that plan did not exist.

Second, we need to get better at working with the reality on the ground, rather than trying to fit the facts into a preconceived policy.

Since the First World War, the driving goal of Western policy in the Middle East has been for unitary states with strong centres. In Iraq and Syria this model has failed. Sectarian hatreds run too deep and politics has become an instrument of revenge. The reality is the best we can now hope for is a form of loose federation with high levels of autonomy for each community, a fair distribution of the oil wealth and a federal government which is seen to govern in the interests of all.

This is easier said than done. Iraq’s Sunni Arabs, caught between tribal leaders, jihadists and disenfranchised Baathists, are a long way from effective self-rule. They don’t trust the Shia-dominated central government and with good reason. The previous Prime Minister, Nouri al-Maliki, pursued deeply sectarian policies which saw Sunni provinces starved of development funds, Sunni politicians arrested or exiled, and the senior ranks of the army stuffed with political cronies who ran away at the first sign of trouble.

Yet regaining Sunni trust is vital. They need a real stake in the new Iraq, one which isn’t wholly dependent on the goodwill of the Shia. The absence of Sunni buy-in is why the gains of the 2007 ‘surge’ – which saw al-Qaeda virtually evicted from Iraq – failed to hold. If we want to defeat ISIS we need to design our policy around this reality, rather than pursuing a centralised Iraq at all costs. Equally, we shouldn’t be afraid to effectively arm the Kurds, who’ve proved to be one of our most reliable allies in the region.

The last thing we have to do is be patient with these countries and stay engaged. Democracy doesn’t take root overnight. It’s always hugely inspiring to see the footage of voters in Iraq and Afghanistan queuing for hours outside polling stations, but this is about much more than just holding elections. Just as important are those institutions that guarantee the rights of all citizens, regardless of who’s in power: a free press, an independent judiciary and protection for minorities.

One of the best Middle Eastern examples of patience paying off is the Kurdistan region of Iraq. After the first Gulf War, the Kurds were at each other’s throats. Yet the No-Fly Zone we helped to enforce for over a decade gave them the space they needed to bury their differences and start building a representative government. Today, Kurdistan is one of the most highly developed and secure parts of Iraq. The peshmerga have proven ISIS’s most stubborn foes because they have something worth fighting for.

This kind of long-term engagement stretches far beyond election cycles, which is why it’s vital that we build a cross-party consensus on Britain’s strategic interests.

There are huge foreign policy challenges ahead. If we’re going to confront them we need to learn from history without letting ourselves be paralysed by historic mistakes, we need our diplomatic service to remain the world’s best, and we need to be mindful of our limitations without losing our confidence that Britain can still be a force for good in the world.