US President Barack Obama has ended his three-day visit to the Middle East by touring the ancient stone city of Petra.

The US president was accompanied at the Unesco world heritage site by a University of Jordan tourism professor. Obama admired the architectural features and 2,000 year-old buildings carved into the sandstone cliffs.

All other tourists were barred from the site for the president's visit, while guards with assault weapons scoured the area for snipers and suicide bombers.

Dressed casually in khaki trousers, a dark jacket and wearing sunglasses, Obama said: "This is pretty spectacular. It's amazing," while he looked up at the Treasury, a towering rose-red façade cut into a cliff. The spectacular location featured in the film Indiana Jones and the Last Crusade.

Jordan's King Abdullah was at Amman airport on Saturday 23 March to bid goodbye to Obama, who was heading back to Washington.

A highlight of the visit came when Israeli Prime Minister Benjamin Netanyahu apologised to Turkey for "any errors that could have led to loss of life" during the 2010 commando raid on an aid flotilla that tried to breach the Gaza blockade.

He also agreed to compensate the families of the nine Turkish activists who were killed.

Turkish Prime Minister Recep Tayyip Erdogan's office told BBC News he had accepted the apology, "in the name of the Turkish people".

Middle East experts say his four-day visit has yielded mixed results.

He brokered an Israeli rapprochement with Turkey but there was little progress on the Palestinian issue.

The BBC's North America editor, Mark Mardell, says the American leader's clear warmth towards Israel comes at a price, and many in the Arab world will feel let down. "Neither cynics nor partisans fully understand the magnitude of Mr Obama's ambition - nor the length of his game," he said.

Palestinians found Obama's visit to Palestine and Israel "disappointing", according to

When meeting Palestinian President Mahmoud Abbas, Obama said that the United States was "deeply committed" to the creation of an "independent, sovereign state of Palestine". He told Abbas that Israeli building activity in the colonies was not "constructive or appropriate for peace".

There were concerns that his rhetoric would remain just that - and not translate into any concrete plans.

"Obama was not prepared to offer the Palestinians anything remotely upsetting to the Israeli Right and, instead, restricted his comments to lofty narratives about the future, and the importance of economic exchanges to achieve coexistence: the mirror image of Netanyahu's 'economic peace', albeit between occupied and occupier," said Marwan Bishara, senior political analyst at Al Jazeera.