At pivotal moments in our history, America has courageously concluded that a central tenet of its foreign policy, conceived with the best intentions, simply isn’t working. Hard though it’s been for this proud and mighty nation to admit failure, trading a losing strategy for a fresh course has brought such triumphs as the Nixon-Kissinger pacts with China that isolated the Soviet Union and helped to end the Cold War.

Today, America faces just such a reckoning in the Middle East. Our objective is clear: halting the spread of terrorism that’s headed for our shores, threatening mass murder in our suburban shopping malls, city tunnels, and crowded parks. With the Middle East in chaos—as though a raging desert sirocco is destroying all sense of order––the US should make a radical, historic shift in its outreach towards the Arab world.

Given the reluctance of America and its Western allies to launch a military offensive, it’s impossible to know when peace will be restored. But right now, while the battles rage, the US can take decisive diplomatic steps to stem the poverty and despair that makes the Middle East a breeding ground for radical Islamic terrorism. America should forge alliances with a new generation of Arab leaders whose principal goal is improving the daily lives of their people. Providing jobs and raising hope among the region’s impoverished youth is the best protection for the world’s wealthy nations, from America, to Europe, to the Arabian Peninsula.

Once peace is restored, the US should take the lead in establishing a 21st century “Marshall Plan” of economic aid to durably lift living standards in the Middle East’s poorest areas.

So what went wrong? For decades, the U.S. has pursued a misguided policy I’ll call “embrace and abandon.” It started with the “embrace:” recruiting and financing leaders who were blatantly autocratic, yet at the time qualified as America’s allies. Then, the U.S. invariably exhorted these strongmen to champion revolutionary democratic reforms in the name of “nation building.” Yet the newly-installed regimes owed their existence to denying freedoms that would rally dissidents to overthrow them. So the democratization America encouraged was doomed from the start.

Then came the “abandon.” Time and time again, when the governments America had nurtured and praised faced resistance or rebellion, Washington deserted their leaders, citing the popular excuse that their repressive measures were enslaving their own people.

Supporting leaders when they kept the Middle East stable, then dumping them when they failed to adopt Western ideals, was a blueprint for disaster. And it’s disaster that ensued. Many of those strongmen––from Mubarak in Egypt to Gaddafi in Libya––have fallen. Once dominated by repressive but stable nation-states, vast swaths of the Middle East are now borderless, a hodge-podge of territories controlled by warring factions that’s a throwback to its tribal past.

The search for a solution to this chaos requires a clear understanding of how we got here in the first place.

For centuries, the Ottoman Empire had neutralized the historically rooted sectarian divisions within Islam. Those divisions stem from its ancient political legacy as a “caliphate,” a religious state with united by military might, but with constantly shifting borders. Following the Ottoman collapse after World War I, European colonial powers assumed the role of regional administrator, and colluded to redraw boundaries (i.e. Sykes-Picot) in the Middle-East to create nation states that satisfied competing Western interests. Those newly-created nations, occupying territories defined by legal borders, ignored Arab history and tribal custom. Modern Western notions of distinct nations bound together by geography, language, self-determination or political ideals been relevant in the Arab world. To Arabs, tribe and religion always trump an imposed political structure, especially the Western-exported concept of the nation-state.

Following World War II, as European colonialism waned, the US assumed a more significant role in the Middle East. US foreign policy was driven primarily by oil interests, the protection of Israel and resistance to Soviet aggression. To prevent the region from dissolving in sectarian conflict, the US established a series of autocracies. The campaign included restoring the Shah of Iran to the throne after the democratically elected Mosaddegh regime nationalized oil fields, and supporting for the Baathist overthrow of the Qasim government in Iraq, which gave rise to Saddam Hussein.

Following the end of the Cold War, America’s foreign policy gravitated toward nation building, and the widespread promotion of democracy and human rights abroad. However, an iron fisted policies the strongmen imposed to remain in power conflicted with the moral endeavor to curate democracy afar. Hence, America’s crusade undermined its original goals by threatening the same autocratic regimes the US had helped establish.

As the leaders the West once championed are toppled one by one, the boot-prints of Western Power are clearly visible. Regimes once supported by the US have fallen, marking the failure of embrace and abandon. In Egypt, Mubarak was in, then deserted. In Iraq, Hussein was in, then deposed. In Libya, Gaddafi was in, then overthrown with US support. In Syria with Assad, it was the same scenario. The instability created by contradictory Western interests has invited far worse atrocities by the new regimes than the crimes perpetrated by the previous order. The massacres in Syria and Iraq are obvious, bitter examples.

Filling the void are a multitude of warring sectarian groups from ISIS to Syrian rebels. The factions each generally fight under their own flag of political Islam. The rise of Islamic factions battling for territory is a legacy of the Iranian revolution that established a state rooted in religion.

Now, nearly four decades old, the Revolutionary Guard’s rise to power remains the catalyst for Islamic sectarian division today, releasing forces of fury once confined first by Ottoman rule and then by US dominance in the region. The threat to Arab nations and the West that ensued is the same as that led by the Ottomans: the spread of a radical Islamic caliphate based on religion, not country. In Iran, this is credo is championed by the Revolutionary Guard and an Ayatollah who lectures two billion Muslims that he is an infallible ruler directly responsible to God. US diplomats are faced with an impossible balancing act: limiting nuclear proliferation and, at the same time, firmly standing against the religious intolerance fanning Islamic terrorism.

The outbreak of these historically opposing forces, compounded by declining oil prices, is heightening the ferment.

The Arab World’s best hope is the rise of a new generation in government. In the UAE, Qatar and Saudi Arabia, brilliant young leaders are crafting forward-looking policies to effectively forge a new Middle East. American foreign policy must persuade these bold visionaries to lean West rather than East. This endeavor will not simply benefit the nations they lead. It’s the most effective strategy to safeguard America’s interests. By supporting their anti-terrorism platforms abroad, America enhances its anti-terrorism policies at home.

Like Asian rulers who launched the Tiger Economies of the mid to late 20th century, these new Arab leaders are searching for policies aimed at economic and educational development. Those policies are designed to reduce internal tensions and secure their countries’ rightful place in a future dominated by global trade. The fate of America’s Middle Eastern allies, as well as its own foreign policy interests, hinges on these reform efforts. These leaders need and deserve active, engaged US support. Yet America’s recent retreat from the region, following clumsy attempts at nation building, has destabilized and discouraged its allies.

Iran is supporting militias in Iraq, Syria and Yemen whose stated purpose is to eradicate Israel. That threat may create what has been a previously unthinkable alliance between our Gulf Cooperating Council partners and Israel. It’s in the interest of all these allies, including Saudi Arabia, Egypt, Palestine, other GCC members, along with Israel, to join forces. That alliance would provide a countervailing balance to the Revolutionary Guard in Iran, the ISIS caliphate and the aggressive aspiration of Turkey, which is further fueled by a renewed Russian push.

The competition for a caliphate has more contestants than just Iran, including ISIS, of course, as well as Turkey, and the Muslim Brotherhood. As the US withdraws, Russia is taking its place as the non-Arab power player in the Middle East. The chill in US-Russia relations has left President Putin free to defy Washington. Without predictable US-support, our allies may have only one direction to turn as Russia capitalizes on every USA misstep in the region.

The emerging alliance between Putin and Turkey’s Erdogan has evolved in perfect Kissingerian fashion; sovereign relationships can be as ephemeral as their counterparties’ interests. And now that Russia and Turkey seem to have a growing relationship, a counterbalancing alignment needs to be crafted between the GCC and the Arab nations.

The Kingdom of Saudi Arabia has been our longest and strongest ally and, to many Westerners’ amazement, it is impossible for the US to move against any hostile Islamic group anywhere in the world without Saudi support. Almost two billion Muslims look to Mecca and Medina as their spiritual heartland and challenging any faction of Islam without the support of its guardian, Saudi Arabia, would be foolhardy.

The Saudis are reliable defenders of the West’s diverse interests in the region, and have been America’s principal ally in the Middle East for more than seventy years. The confused notion that Saudi Arabia is synonymous with radical Islam is falsely based on the Western notion that “one size fits all.” Fundamentalists supporting the Islamic State in the Kingdom violate the rule of law at home, and the Saudis’ strong efforts to prevent the export of terrorism. Saudi senior leaders desire good relations with the West and see the Islamic State and Jihadist terrorism as threatening to their very rule. Through the safeguarding of the Holy Cities of Mecca and Medina, which remain open to tens of millions of foreign visitors and differing Islamic beliefs, the Kingdom has a unique window into the actions and motivations of radical fundamentalists who pass in and out of those always accessible cities. By sharing that intelligence, the Saudis greatly enhance America’s security.

Like it or not, the military option most unpopular with America’s voters and politicians may be its best. Bashar Assad may well be our only hope in fighting the various terrorist factions that are attempting to form an ISIS state. If America agrees that putting boots on the ground would be impractical and ineffective, then a self-governed “Syria State” must be the entity that reaches settlements with the various factions that are causing the mass migration of thousands of Syrians to Europe, the USA and elsewhere. The only solution is one that works with Russia and not against them. Our vacuum forced that hand, because we are no longer the lonesome superpower shaping Middle East foreign policy.

When the USA had a narrow set of interests during the Cold War era, acting prudently in favor of well-defined and communicated objectives, its actions were more effective. But as the objectives changed, and America attempted to democratize autocracies, the broadening of goals led to a corresponding weakening of results. A clear direction in the Middle East is imperative, not just to enhance Middle Eastern nation-state interests, but to protect US interests at home, as well as abroad.

America’s nation-building exercise of the past twenty years was founded on self-contradictions that have tarnished US foreign credibility. The geopolitical framework for that policy has been “embrace and abandon,” a formula that has caused frustration, confusion and concern to America’s allies in the region and displaced many millions of young refugees.

As America rethinks its interests in the Middle East, its primary concern is the elimination of domestic terrorism. The path forward replaces fear with hope and poverty with prosperity. Once security in the Middle East is attained, including a negotiated peace between the Israelis and the Palestinians, the USA must respond with an “end-state” perspective to draw a comprehensive solution similar to the Marshall Plan. Going from promoting then dumping dictators to drawing a new manifesto for economic rebirth would mean that finally, the America is finally doing right in teeming, oil-rich desert lands where it did wrong for decades.

Thomas J. Barrack Jr. is an international private equity investor and the founder and executive chairman of Colony Capital. He is also foreign policy and economic advisor to GOP U.S. Presidential candidate Donald Trump. The views expressed in this article are his own and do not reflect the campaign.