Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today's WorldView newsletter.

Ahead of President Trump's much-anticipated speech in Saudi Arabia, delivered before a gathering of Muslim statesmen on Sunday, there was a great deal of speculation into what Trump would say about Islam — a faith, after all, that he once claimed “hates us” and whose devotees he once sought to bar from entering the United States. Trump shied away from declaiming “radical Islamic terrorism” before this audience, a set of words he had previously given an almost totemic importance in the war against extremism. Instead, in Riyadh, he offered a message of unity and common purpose, urging the assembled leaders to “drive out” the Islamist militants in their midst.

“This is not a battle between different faiths, different sects or different civilizations,” Trump said. “This is a battle between barbaric criminals who seek to obliterate human life and decent people, all in the name of religion — people that want to protect life and want to protect their religion. This is a battle between good and evil.”

Trump on terrorism: 'This is a battle between good and evil' (The Washington Post)

But let's be clear about what the speech really was: A sop, soaked in platitudes, to the Saudi agenda in the Middle East.

As we wrote last week, the Saudi leadership has pinned great hopes on a reset with the United States. Relations soured with a previous administration in Washington that sought a kind of rapprochement with Iran, Saudi Arabia's regional nemesis. Moreover, Barack Obama's perceived support for the 2011 democratic uprisings of the Arab Spring — regarded with horror in Riyadh — and his occasional paeans to human rights and the need for democratic reforms in the region did little to endear himself to the Saudi royals.

Then came Trump, who grandstanded against the nuclear deal signed between Iran and world powers, and who repeatedly emphasized his indifference to “universal values” and the moralizing of his predecessors. The Saudis used this weekend to play into Trump's “America First” agenda — announcing hundreds of billions of dollars of investments on U.S. weapons and infrastructure that Trump could hold up as a win for American workers at home. It appeared that Saudi funds had also been directed toward a new women's initiative launched by Ivanka Trump, the president's daughter, as well as the investment company of a close Trump associate.

But what Trump gave in return was significant. His remarks on Sunday were preceded by King Salman, who told dozens of Muslim leaders that the regime in Tehran “represents the tip of the spear of global terrorism.” Trump followed up with equally harsh language, saying that “all nations of conscience must work together to isolate” Iran. He also offered no criticism of the Saudi-led war in Yemen, which has seen high civilian casualties and precipitated a food shortage that has left millions of people in danger of starving to death.

The Obama administration had sought to keep its distance, perhaps ineffectually, from the toxicity of the Saudi-Iranian rivalry — a struggle between the vanguards of Sunni and Shiite Islam, respectively, that has flared into damaging proxy wars in the Middle East. Now, Trump has decided to throw his lot behind the Saudis.

“This whole meeting looked like a 'Sunni international,' in which the main non-Sunni power in the Muslim world, Iran, was bashed by both the American President and his Sunni hosts,” wrote Turkish columnist Mustafa Akyol in the New York Times. “This is not going to help anything other than adding to the sectarian divide. It is not fair, either. Iran has lots of sins to account for — including its cynical support for the bloody regime of Bashar al-Assad in Syria. But most radical Islamist terrorists in the region are Sunni, not Shiite. In fact, in terms of their theology and jurisprudence, they are much closer to Saudi Arabia than Iran.”

In an op-ed, Iran's foreign minister Javad Zarif cheekily warned Trump about his new business partners. Critics of Saudi Arabia routinely point to the fact that its state-sanctioned orthodox brand of Islam has fueled decades of extremism. Zarif referred to the Saudi origins of many of the 9/11 attackers.

Trump “must enter into dialogue with them about ways to prevent terrorists and takfiris from continuing to fuel the fire in the region and repeating the likes of the September 11 incident by their sponsors in Western countries,” Zarif wrote for the website of the London-based Al Araby Al-Jadeed news network. A takfiri is a Muslim who accuses another of apostasy — rhetoric not uncommon among certain Saudi imams when training their ire on Iran's Shiites.

Trump, too, has criticized the Saudis for their perceived role in fomenting radicalism, but said nothing of it during this trip. Instead, he appeared at the opening of a Saudi-run center for “combating extremist ideology.” Along with the Saudi king and Egyptian President Abdel Fattah al-Sissi, Trump inaugurated the site by placing his hands on a glowing white orb.

The surreal moment spawned myriad Twitter memes, but it also signaled something deeper about Trump's new agenda. Sissi, a controversial figure who came to power through a military coup and has proceeded with a brutal crackdown on dissent, has earned special plaudits from Trump for his supposed tough stance on terrorism. And King Salman is one of a number of monarchs and autocrats Trump has now championed as the key to bringing renewed stability to the region. His speech — unlike Obama's famous address in Cairo in 2009 — was directed toward these leaders, not the populations that in many instances chafe under their rule.

“We are adopting a principled realism,” said Trump, with “partnerships” that “will advance security through stability, not through radical disruption.” He added that “wherever possible, we will seek gradual reforms, not sudden intervention. We must seek partners, not perfection.” This is music to Saudi ears.

It was not lost on observers that Iran just concluded a presidential election that saw a huge turnout, with voters returning the moderate President Hassan Rouhani to power. Critics of the regime in Tehran say the exercise is hardly democratic, given the overweening power of the country's theocratic supreme leader and its influential military institutions like the Revolutionary Guard. But it's certainly an improvement on Saudi Arabia's own system, a strict monarchy where women's rights are still curtailed and where one large royal family controls the levers of power.

Moreover, in Trump's speech about fighting extremism, there was no acknowledgment of some of the underlying drivers of radicalization, including widespread youth unemployment and the repressiveness of many regimes in the Arab world. Maybe Trump was being a polite guest. Or maybe he doesn't care.

Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today's WorldView newsletter.