When Barack Obama began his presidency, one of the first things he did was to make a landmark speech in Cairo in which he addressed the Muslim world.

In the wake of 9/11, Guantanamo Bay and the catastrophe of the invasion and occupation of Iraq, Barack Obama, who was swept into office amidst a global tide of optimism and (to borrow from his campaign slogan) hope, passionately called for a re-start to the relationship between the United States and the Muslim world.

It was, as the Americans like to say, a "Kodak moment".

Here was the first African American President, whose father was a Muslim and whose middle name was Hussein, reaching out to the Muslim world from the Oval Office itself.

Fast forward nearly eight years, and Barack Obama, arrives in Saudi Arabia, the wealthiest and most powerful Arab country (financially and diplomatically at least) viewed as the most unhelpful and antagonistic President the Saudi royal family has probably ever had to face.

Several things are at play to make this an awkward trip for both sides.

President Obama has invested a huge amount of diplomatic capital in clinching a nuclear deal with Iran (Saudi Arabia's main regional competitor) which lifts an enormous shadow from Iran's relations with the West and the US in particular.

The deal comes at a time when Shia Iran is making huge headway for influence and power at the cost of Sunni Saudi Arabia; from Syria, to Yemen, to Lebanon and Bahrain – Iran is in the ascendancy, Saudi Arabia and its Gulf allies are on the defensive.

While Iran is in the ascendancy, Saudi Arabia is on the defensive Credit: Reuters

Then comes a recent extraordinary interview President Obama gave to a US magazine in which he made remarkably candid remarks about how he saw the Saudis.

He even recently called them "freeriders" on the back of US military support and guarantees.

What's more, Saudi Arabia feels increasingly vulnerable at home.

The collapse of the oil price has severely restricted the lavish socio-economic support it's been able to give its citizens, and the puritanical brand of Salafist Islam that underpins its rule has given ideological openings to Al Qaeda and ISIS at home where shootings and attacks have occurred within the kingdom.

However, this is a temporary issue, not a permanent strategic rupture. T

The United States is still the ultimate and final military protector of last resort for Saudi Arabia and an indispensable ally, whatever the outlook and policies of the incumbent President.

They may grudgingly welcome President Obama in Riyadh, but they probably can't wait to see the back of him.