Barack Obama has been in office for four and a half years. While it is too early to judge his overall foreign policy legacy, what can be said about the fortunes of the United States in the Middle East is not reassuring. Under Mr Obama, America has been in retreat in the region, sometimes through no fault of the president's, but more often because he has allowed this to happen.

From the start, Mr Obama sought to break with his predecessor George W Bush, who had made US policy in the Middle East a cornerstone of his behaviour overseas. This was due to the September 11, 2001, attacks, which focused Washington's attention on terrorism emanating from the Arab world. US involvement expanded when Mr Bush invaded Iraq to overthrow Saddam Hussein.

In December 2011, Mr Obama, a staunch critic of Mr Bush and the Iraq war, ended the US campaign in Iraq, withdrawing troops earlier than had been scheduled. This was welcomed by an American public tired of constant wars abroad, but it left behind a fragile Iraq, just as it was beginning to rediscover relative peace after years of conflict.

Mr Obama washed his hands of a country that had cost the US thousands of lives and billions of dollars without first attempting to contain Iran's growing influence there. While Mr Bush had facilitated Iran's agenda there by removing the Iraqi regime, Mr Obama seemed unperturbed by the fact that Washington's principal regional rival would benefit from too hasty a US disengagement.

The loss of Iraq was compounded by a far more serious strain on American alliances when the so-called Arab Spring broke out in early 2011. No matter how justified, the Obama administration's decision to persuade the Egyptian president, Hosni Mubarak, to step down had two consequences: it pushed an allied country into a prolonged period of political uncertainty and it alarmed another long-standing ally, Saudi Arabia, which came to question American reliability.

After Mr Mubarak's downfall, the US avoided intervening in the Egyptian political process, which was defensible. Less understandable was why the Obama administration did not help the new leadership to consolidate a democratic post-Mubarak political and economic system. The only thing that seemed to truly concern Mr Obama was whether Egypt maintained its peace treaty with Israel.

The US retains influence in Egypt, particularly over the army. But its ties with the Muslim-Brotherhood-dominated government have been variable. This may ultimately make for a healthier relationship than before, but unless Washington helps unify the hopelessly divided political class and encourages economic reform, Egypt may succumb to chronic political and financial instability. Allowing this is not an option for the US, which in over three decades has spent tens of billions of dollars to turn Egypt into a pillar of its regional presence.

The Saudis were distressed with Mr Mubarak's departure, and even more so with the Obama administration's encouragement of it. If the Egyptian leader could be abandoned, the Saudis felt, then why not the Saudi monarchy? In fact that was not Mr Obama's intention and ties between the US and the kingdom have improved since then, although there remains a lack of closeness between the two.

Washington has behaved ambiguously towards Saudi priorities. The administration is not particularly happy with the Saudi-endorsed policy in Bahrain, but has done nothing to prevent it. On Iran and its nuclear programme, the US has imposed sanctions, but continues to avoid any resort to war.

Mr Obama has shown little interest in the region, so the Saudis see a president upon whom they feel they cannot rely. This has handicapped America's ability to enrol the Saudis in its diplomatic ventures, above all peace talks between the Israelis and Palestinians.

Mr Obama's initial willingness to depend on an alternative country, Turkey, to help advance American regional interests has failed, as Turkish limitations in the Syrian conflict have become evident.

The notion that America can lead from behind is a fantasy. Without America in the vanguard imposing a common agenda, there will be only cacophony as America's allies pursue separate aims.

Nowhere has this been more obvious than in Syria, with Qatar and Turkey supporting some rebel factions, and the Saudis backing their rivals.

Gone are the days of the 1990s when the US held all the reins in the Middle East. Then, the regional architecture was built on the combination of a friendly Egypt that played a vital role in bolstering American regional diplomacy, Saudi Arabia, which steadied the energy markets, and Israel, which was America's foremost military arm in the region, and whose conflict with the Arabs was supposed to be resolved through an American-sponsored peace process.

Mr Bush's invasion of Iraq sent a shock through the region and shattered the Arab status quo. Iran gained in Iraq, worrying the Sunni Gulf states and heightening Sunni-Shia tensions. Mr Obama, in turn, downgraded America's regional presence, creating a vacuum that its allies have struggled to fill.

Syria's conflict embodies American duality, with the Obama administration frustrated by a fractured opposition pulled on all sides by regional actors, even as Washington remains unwilling to force President Bashar Al Assad from office itself.

The US is an important actor in the Middle East, with tremendous military power, but its ability to shape the region's future has been greatly reduced. Mr Obama's reluctance to be sucked into regional dynamics has left a volatile void.

For the first time, it is possible to discern the contours of a potential post-American Middle East. It's no surprise that Russia, China and Iran are exploiting this opening.

Michael Young is opinion editor of The Daily Star newspaper in Beirut

On Twitter @BeirutCalling