RIYADH • As voters in Iran danced in the streets, celebrating the landslide re-election of a moderate as president, US President Donald Trump stood in front of a gathering of leaders from across the Muslim world and called on them to isolate a nation he said had "fuelled the fires of sectarian conflict and terror". That nation was Iran.
In using the headline address of his first foreign trip as president to declare his commitment to Sunni Arab nations, Mr Trump signalled a return to a US policy built on alliances with Arab autocrats.
At the same time, he rejected the path taken by predecessor Barack Obama, who engaged with Iran to reach a breakthrough nuclear accord, which Mr Trump's administration has acknowledged Iran is following.
Mr Trump has presented the shift as a reinvestment in historical alliances with friendly nations in order to fight extremism and terrorism. But the juxtaposition of the election in Iran and the gathering in Saudi Arabia seemed to highlight a reality of the Middle East that presidents have long wrestled with: How to choose partners and seek US interests in a region torn by sectarian splits and competing agendas?
For decades, Saudi Arabia and Iran have competed for religious leadership and political influence across the Muslim world and beyond.
Iran and its proxies have effectively found themselves on the side of the United States in fighting militants in Iraq while, in Syria, they have been adversaries in their support for the rule of Syrian President Bashar Assad.
Saudi Arabia has at times undermined US efforts to stabilise Afghanistan. "We are picking one side in this geopolitical struggle, and there is very little room for grey," said Mr Frederic Wehrey, a senior fellow in the Middle East Programme at the Carnegie Endowment for International Peace.
"Sectarianism is a by-product of this geopolitical rivalry, and we are inadvertently picking one side in this sectarian struggle."
In his remarks, Mr Trump signalled his intention to end engagement with Iran, suggesting that it does not encourage change from inside the country.
But in Iran, many were pushing for change. Emboldened by the election results, crowds of Iranians in the capital, Teheran, demanded what they hope President Hassan Rouhani's second term will bring: The release of opposition figures, more freedom of thought and fewer restrictions on daily life.
In deepening the US alliance with Gulf countries, Mr Trump is bringing it closer to nations that share few cultural values with the United States and have sometimes acted against its interests.
In adopting the Gulf perspective on Iran, Mr Trump could be assisting a strategy Gulf leaders use when times get hard at home.
"It is feeding into the Gulf narrative, where they project a lot of their insecurities about domestic politics outward and onto the Islamic Republic of Iran," said Mr Wehrey.
"But is Iran the source of all evil in the region? No."
Trump tells Middle East to drive out Islamist extremists. http://str.sg/4uf7