The hypocrisy of America’s support for unelected despots in the oil-rich Gulf states is not new, but Donald Trump’s lavish praise for them on Sunday, as allies against “Islamist extremism” and “the oppression of women,” was particularly striking, coming one day after Iranian voters danced in the streets to celebrate their reformist president’s landslide re-election.

As Iran’s moderates celebrated on Saturday night, Trump and members of his cabinet were dancing with swords in Saudi Arabia.

Speaking in the Saudi capital of Riyadh on Sunday, Trump made no mention of the scenes in Iran or of President Hassan Rouhani, whose diplomatic engagement with the West over Iran’s nuclear program helped to avert the war American allies in the region, including the Gulf states and Israel, seemed to be still hoping for.

Instead, the American president promised the monarchs and autocrats in the room that he would work with them “to isolate Iran.” He also promised, bizarrely, “to help our Saudi friends to get a good deal” from American arms makers.

As Trita Parsi of the National Iranian American Council observed, Trump seemed to be in full agreement with his host, King Salman of Saudi Arabia, who called Iran’s government “the spearhead of global terrorism.”

After the speech, Trump accompanied King Salman, President Abdel Fattah el-Sisi of Egypt and other leaders to open a new Global Center for Combating Extremist Ideology in Riyadh.

In meetings with other monarchs earlier on Sunday, Trump assured the King of Bahrain that relations between the two nations would no longer be strained by a brutal crackdown on pro-democracy protesters, and said his discussion with the Emir of Qatar would focus on “the purchase of lots of beautiful military equipment.”

As the vote-counting in local elections in Iran continued on Sunday, the contrast between Saudi Arabia’s absolute monarchy and the partial democracy there became even more stark with the news that moderates had also won sweeping victories in Tehran and other cities.

Iran’s foreign minister, Mohammad Javad Zarif, offered a Twitter rebuttal to Trump, suggesting that his support for the Saudi king was driven mainly by the opportunity to sell billions of dollars in American weapons to the kingdom.

Even as Rouhani’s supporters celebrated, however, there were reminders of the limits on democracy in Iran — where the elected president serves under the country’s ruling cleric, Supreme Leader Ayatollah Ali Khamenei.

In many places, cheers for Rouhani’s victory were accompanied by chants in support of Mir Hussein Mousavi and Mehdi Karroubi, reformist leaders who have been under house arrest since encouraging post-election protests in 2009.