Editor's note: Frida Ghitis is a world affairs columnist for The Miami Herald and World Politics Review. A former CNN producer and correspondent, she is the author of "The End of Revolution: A Changing World in the Age of Live Television." Follow her on Twitter: @FridaGColumns
Amman, Jordan (CNN) -- They're bringing down the American flags in Jordan and Israel and putting them back into storage after they got slammed in a sudden sandstorm during the last part of President Barack Obama's visit. Perhaps it was nature's way of keeping Obama from feeling he had gained the upper hand in this famously unpredictable region. Sandstorm or not, the president had reason to feel good about his trip.
After deliberately lowering expectations about what he might achieve on the trip, Obama knocked it out of the park.
He even managed to take the skeptics by surprise, helping broker the restoration of relations between Israel and Turkey.
Bolstering friends, strengthening alliances and sending everyone in the Middle East a clear picture of America's vision and priorities for the region -- this was the common thread in everything the president did in Israel, the West Bank and Jordan.
He made a persuasive case that the U.S.-Israel alliance is, in his words, "eternal, it is forever." He spoke passionately and effectively in favor of Palestinian statehood and the need to restart the peace process. He made it clear the United States will not tolerate a nuclear Iran but prefers to prevent it through diplomacy. He reiterated his call for an end to the Bashar al-Assad regime in Syria and showed his strong support for Jordan's King Abdullah, a moderate king who says he is trying to democratize his country without the need for bloodshed.
As Obama returns to Washington, not everyone is happy about what they heard. But if power is the ability to influence the behavior of others and the course of events, then he managed to make America a bit more powerful after a mere three days in this turbulent region.
In a visit filled with poignancy, symbolism and, yes, substance, one of the most dramatic and unexpected moments came minutes before Air Force One departed Israel for Jordan. As the milky white sky gave signs of trying to clear, Obama and Israeli Prime Minister Benjamin Netanyahu stepped inside a trailer on the tarmac and made a historic call to Turkey's prime minister.
When the call was over, Israel and Turkey had restored diplomatic relations. After an acrimonious three-year dispute over a botched and lethal 2010 Israeli raid on a Turkish-flagged flotilla trying to break the Gaza blockade, Netanyahu apologized.
The reconciliation was not all Obama's doing, but he gave the final push that allowed two pivotal Washington allies to work out their differences at a time when events in Syria and Iran demand the United States and its friends work closely together.
A major objective of the trip was to convince Israel and its enemies that the United States is committed to Israel's survival. The goal is fundamental to regional stability, because as long as anyone has any doubts, those who advocate destroying Israel will continue pursuing the objective and gaining followers while making Israelis more hesitant to take risks for peace.
From the moment he landed, Obama alluded to 3,000 years of Jewish history on the land. He told Israelis -- in Hebrew, lest they miss it -- "Atem lo levad," "You are not alone." He talked about Israeli tourists recently murdered in Bulgaria, about threats from Hamas, Hezbollah and Iran, about chemical weapons from Syria. And then he made an impassioned call for Israelis to take the perspective of Palestinians, for the sake not only of their own security but also of justice. Israelis cheered.
It was a masterly performance.
By spending time in the West Bank, Obama raised the profile of Palestinian President Mahmoud Abbas relative to that of his rival Hamas. And when he declared that those who seek Israel's destruction "might as well reject the earth beneath them and the sky above," his words threw a punch against Hamas and Hezbollah, whose stated objective he was labeling a hopeless cause.
When he arrived in Jordan, America's most reliable Arab ally, he widened the lens to the growing crisis in Syria, which is spilling over, sending more than 400,000 refugees to a country practically devoid of natural resources. He pledged an additional $200 million to King Abdullah for the sustenance of the refugees still fleeing Syria by the thousands every day.
Standing with the Jordanian king, with the knowledge that Israel and Turkey had healed their rift, Obama projected an air of confidence and achievement, even if events in Syria seem to spin out of control; even as King Abdullah warned the West has become naive about the agenda of the Muslim Brotherhood, the biggest winner so far in the so-called Arab Spring.
This was Obama's first visit to an Arab country since 2009. Back then, Egypt was America's strongest Arab friend. Today, the Middle East is undergoing a violent and unpredictable transformation.
During barely 72 hours in the region, Obama reasserted a measure of influence. He laid out America's vision and gave a vote of confidence to America's friends. It was a subdued but visible show of U.S. influence and power in a time and a place of unexpected sandstorms and ferocious revolutions, where no man, no nation, has full control over the course of history.
Follow us on Twitter @CNNOpinion.
Join us on Facebook/CNNOpinion.
The opinions expressed in this commentary are solely those of Frida Ghitis.