PETRA, Jordan (CNN) -

U.S. President Barack Obama wrapped up his trip to the Middle East on Saturday with a walking tour of the ancient city of Petra in Jordan.

The city's breathtaking architecture features buildings partly carved into stone cliffs and combines eastern culture with ancient Greek constructions. It is a UNESCO world heritage site.

Obama was accompanied on a leisurely tour through Petra's steep red-rock formations by a University of Jordan tourism professor, with all other visitors kept well away -- except for a few stray cats.

Soon after his stroll through the arid landscape, renowned for its colorful interplay of light and shadow, the president headed back to Washington.

A last-minute success

Just before departing for Jordan on Friday, Obama scored a diplomatic coup when Prime Minister Benjamin Netanyahu apologized to Turkey for a 2010 commando raid that killed nine activists on a Turkish vessel in a Gaza-bound flotilla.

The apology, long sought by Turkish Prime Minister Recep Erdogan, eased strained feelings between Turkey and Israel, two vital U.S. allies in the Middle East.

It happened in a phone call to Erdogan during a final meeting between Obama and Netanyahu at an international airport in Tel Aviv, minutes before Air Force One departed for Jordan to complete the president's Middle East swing.

Obama hailed the development as an important step forward for both countries.

The diplomatic efforts will continue after Obama's departure.

A senior U.S. State Department official said Secretary of State John Kerry would meet with Netanyahu on Saturday evening.

Before that, Kerry will meet with Palestinian Authority President Mahmoud Abbas "to continue the conversations they started with President Obama and the secretary earlier this week," the official said.

Jordan's refugee influx

Friday in Jordan, Obama focused on the civil war in neighboring Syria, with King Abdullah telling reporters that the conflict has already caused 460,000 refugees to flood his country and more are on the way.

That is equivalent to 10% of Jordan's population, and the total could double by the end of the year, the king said. He asked for more help from the international community as his country also deals with internal reforms in response to economic woes that are raising public dissatisfaction.

Obama said he was working with Congress to provide an additional $200 million to Jordan this year to help deal with the refugee influx, but he remained steadfast in his refusal to pledge U.S. military assistance to the Syrian opposition movement.

However, Obama repeated past warnings that his stance on military involvement could change if Syria uses chemical weapons.

Jordan is suffering from refugee fatigue. Masses of people have fled there from neighboring countries whenever conflict was rife. The Syrian conflict comes on top of the flood of refugees that came from Iraq just a decade ago.

The country is a close U.S. ally and has been one of the most stable in the region, but it has seen recent internal turmoil and discontent.

King Abdullah has a reputation for benevolence, unlike autocratic rulers such as Syria's Bashar al-Assad or deposed Iraqi dictator Saddam Hussein. One house of the Jordanian parliament is democratically elected.

However, a weak economy and allegations of corruption by public officials have stoked dissatisfaction with him.

In November, crowds took to the streets calling for King Abdullah's downfall because of rising gasoline prices.

More recently, comments attributed to King Abdullah in the The Atlantic caused further anger toward the monarch, who was quoted as calling the opposition Muslim Brotherhood a "Masonic cult" and referring to tribal elders in his country as "old dinosaurs."

The royal court says some of King Abdullah's comments in the magazine were taken out of context by local Jordanian and international media outlets who reported on the article.

Courting Israel