In 2015 alone, a million migrants entered Europe, most of them from the war-shattered lands of the Middle East. Since 2012, over three million Syrian refugees have fled to Turkey. The conflicts in several Arab countries have yet to peak. Refugee flows will continue to increase, not decrease. Tens of thousands of Muslims and others have already died at sea trying to enter Europe. What does it say about societies and governments when their people are, literally, dying to leave them for Europe?

There are urgent steps we need to take in partnership with, not by dominating, the Middle East. First, we need to respond to the calls from the region and assist in the creation of a Middle East Union. Not long ago, Europe was a continent that looked the way the Middle East looks today. It was full of dictators and stalked by political extremists. Its intolerance of minorities led to the horrors of the Holocaust. Perpetual contests over its national borders triggered two world wars. This depressing picture is now being repeated across the Middle East, from Morocco to Syria to Yemen. The rise of religious sectarianism in Iraq and Syria, as well as the repression of Islamists in Egypt, produces the magnetic narratives of radicalism that find adherents among young Muslims in the West.

Europe’s past and present can inform the future of the Middle East.

Ironically, despite current fractures over its future direction, the European Union’s history and stability offer a model for putting the Middle East back together in a way that reinstates thymos, a sense of pride in their place in the world, the political desire for recognition and respect as dignified ancient peoples. Just as a warring continent found peace through unity, by creating what became the EU, so Arabs, Turks, Iranians, Kurds and other groups in the region could find relative peace in ever closer union. Most of its problems – terrorism, poverty, unemployment, sectarianism, refugee crises, water shortages – require regional answers. None of the countries concerned can solve its problems on its own. The rule should be simple: we need to face in common that which we cannot do alone.

Egypt’s President Abdel Fattah el-Sisi, in full recognition of regional challenges, has at several junctures called for the creation of a joint Arab military force. A Middle East Union could hold the key to a common security response to the shared threat of regional jihadism. Egypt describes this as “one of the most important tools of integration of the Arab world to defend the causes of Arab nations”, alongside the economic integration of Arab countries.

Such regional amalgamation and assimilation would have other benefits, and meet other needs too. For example, Egypt has low-cost labour but high youth unemployment. Neighbouring Libya has excess capital, huge infrastructure projects and an insatiable demand for workers. Turkey has the expertise to build airports, bridges and roads. These dots need connecting.

For more than a millennium, the Middle East was broadly united under different monarchical dynasties. Free movement of people, goods, tribes, ideas and armies was the norm.

There was a common religion for most and, compared with other regions of the world, there were fewer languages and more commonalities of culture and history. When Europe’s medieval pogroms were unleashed, it was the Muslim Mamluks and Ottomans who welcomed Jews. Minorities were protected when the majority had confidence in themselves.

Most people in the Middle East today no longer feel the dignity of their ancestors. Thymos is desperately missing. This is something an MEU could recreate. Through a sharing of resources and policies, the necessary corrections could be made in the education systems of the Middle East to promote critical thinking and develop open minds that honour women as equal human beings in the workplace and in families.

Conflict in Europe was eroded by Europeans growing more interdependent on each other for trade, security and prosperity, and joining their governments and peoples closer together. During Britain’s referendum to exit (“Brexit”) the EU, the strongest warning not to leave came from the then Conservative prime minister, David Cameron: “The European Union has helped reconcile countries which were at each other’s throats for decades.” He talked about “maintaining common purpose in Europe to avoid future conflict between European countries”. It is the absence of any such architecture of unity in the modern Middle East that creates fertile grounds for fanatics.

In a special report on the Arab world entitled “The War Within”, the Economist put forward a similar argument:

Arab states could do with more supranational integration to open markets and spur growth. As a political body, the Arab League is a failure. But many Arabs admire the European Union, even as it loses its appeal to a growing number of Europeans, not least because of Arab refugees. European history provides some solace to Arabs: before the continent united, it waged wars even bloodier than those Arabs are enduring.

Israel, meanwhile, should be an ally and trading partner of this regional union, and eventually a member. Palestinians must be allowed to travel and trade across the Middle East rather than languish for further generations in refugee camps as recruitment fodder for Hamas and the jihadis.

Israel’s technological, educational and innovative advantages over its Arab neighbours should be motivational: why does Israel have more patents and Nobel Prize winners than the entire Arab world combined? Israel is a magnet for global investors – peace with Israel would ensure that capital is spread across the region. Per capita venture capital investments in Israel in 2009 were 2.5 times higher than in the United States, more than 30 times greater than in Europe, 80 times higher than in China, and 350 times larger than in India. In absolute terms, Israel, a small nation of only 7 million people, attracted almost 2 billion dollars in venture capital, as much as owed to the UK’s 61 million people. For how much longer must there be conflict rather than cooperation?

Regional thinkers and leaders have made calls for unity for almost a century. This is not, therefore, a Western project. Intellectuals of the past sowed the seeds of regionalist thought long ago. In polls, most people in the Middle East have been found to see themselves primarily as Arab or Muslim before, say, Jordanian or Saudi. Pan-Islamic identity still has more resonance than nationality.

Such calls for closer regional collaboration have been echoed by former president of Turkey Abdullah Gul, the Saudi king, the president of the United Arab Emirates, Jordan’s monarch – and also by more threatening voices among Hamas, Egypt’s Salafists and the Muslim Brotherhood. On a visit to Egypt in April 2016, King Salman of Saudi Arabia, addressing the Egyptian parliament, called for regional issues to be addressed through regional unity. This did not make headlines in the West, but it reflected the instincts of the peoples and politicians of the Arab world’s two most powerful nations. The commitment of both sides to building a new bridge across the Red Sea to connect their countries is a symbol of this urge for greater Arab unity.

ISIS already operates beyond nation-states, and its trans-national outlook and ideology are spreading fast worldwide. Is the West going to wait until the Islamists and radicals are powerful enough to create a Middle East in their own image, one hostile to the rest of us?

Or will it help its Middle Eastern partners in government to harness this momentum for greater unity? This is the moment to create multilateral institutions that could embed pluralism across the region as firmly as Mustafa Kemal Atatürk’s constitution did in Turkey almost a century ago. An MEU would not be the caliphate of the literalists or the secular democracy of liberals, but a pluralistic political and economic union true to the reality of the region, where the sharia is honoured through the Maqasid of preserving life, freedom, intellect, family and property. Yearning for the sharia will not vanish. “Human beings will no more cease to be religious than they will stop being sexual, playful or violent,” warns John Gray. But the Maqasid approach to the sharia, being at once rooted in history and scholarship dating back nine hundred years and at the same time readily applicable to the modern world, is the most constructive way forward for Muslim activists.

In short, conservatism, capitalism and coexistence should be the forces behind creating a new Middle East order that provides dignity, security and stability for the region and the wider world.

Excerpted with permission from The House of Islam: A Global History, Ed Husain, Bloomsbury.