Washington CNN  — 

Before President Donald Trump delivered his highly anticipated speech in Saudi Arabia on Sunday, much of the media focused on one phrase: radical Islamic terrorism.

Would Trump continue to use the term, as he did throughout the 2016 presidential campaign? Or would he find a less controversial variant, like “Islamist extremism,” in front of his Saudi hosts?

In Sunday’s speech, he had it both ways.

“There is still much work to be done,” Trump said. “That means honestly confronting the crisis of Islamic extremism and the Islamists and Islamic terror of all kinds.”

Briefly, “Islamist” refers to political movements that attempt to implement Islamic law and theology. “Islamic” refers to the religion itself, and many Muslims take offense at associating their faith with violence.

The phrase “Islamic terror” was not in the President’s prepared remarks; his mention of it was an exhaustion-induced oversight, a senior White House official said. But intentional or not, Trump’s language revealed his administration’s two minds on Islam.

On the one hand, Trump pleased American Muslims by calling Islam “one of world’s great faiths,” a departure from his accusation, made just last year, that “Islam hates us.” He also sought to undercut terrorists’ arguments that they embody Islamic ideals. They worship death, not God, the President said. They are “barbaric criminals,” not true believers.

“Every time a terrorist murders an innocent person, and falsely invokes the name of God, it should be an insult to every person of faith,” he said.

Trump also rejected the “clash of civilizations” narrative pushed by some of his senior aides, notably Steve Bannon, who has warned darkly of a looming battle between the West and “Islamic fascism.”

Instead, Trump said: “This is not a battle between different faiths, different sects, or different civilizations. This is a battle between barbaric criminals who seek to obliterate human life, and decent people of all religions who seek to protect it. This is a battle between good and evil.”

Shahed Amanullah, a former senior adviser at the State Department, said, “President Trump clearly separated Islam from terrorism, unlike candidate Trump.” Was it “on the job learning, or duplicity?” he asked.

On the other hand, Trump’s speech adopted Bannon’s overall approach to terrorism: that it’s mainly a religious and military problem, and poses an existential threat to the West. And the president cheered his conservative base by addressing “Islamic terror” in lurid, nearly apocalyptic language.

“We now face a humanitarian and security disaster in this region that is spreading across the planet. It is a tragedy of epic proportions. No description of the suffering and depravity can begin to capture its full measure,” Trump said.

He called on Muslim nations to drive extremists into extinction and touted his new $110 billion arms deal with the Saudis as a necessary measure against terrorism.

Trump also urged religious leaders to deliver a stark message: “Barbarism will deliver you no glory – piety to evil will bring you no dignity. If you choose the path of terror, your life will be empty, your life will be brief, and your soul will be condemned.”

So, while Trump acknowledged that terrorists have no truck with religion, he nonetheless implied that mainstream imams and other Muslim leaders somehow hold sway over them. If that were true, perhaps ISIS would have heeded the more than 5,000 condemnations of terrorism Muslims have issued in recent years.

“He clearly thinks terrorism is fueled by religion,” said Ebrahim Moosa, a professor of Islam at the University of Notre Dame. “He doesn’t make any connection between terrorism and political resentments and the oppression of people.”

To be fair, Trump is hardly the first president to insist that terrorism both is, and is not, a religious issue.

The Obama administration, which pointedly refused to use the term “Islamic terrorism,” angered American Muslims by hosting a summit on countering violent extremism two years ago that focused almost exclusively on Islam. In a speech at the summit, Obama, like Trump, said Muslim clerics have “a responsibility to push back” on “twisted interpretations of Islam.”

But the Obama administration was generally consistent on one point: refusing to grant groups like ISIS the religious legitimacy they crave by calling them “Islamic.” It was a counter-terrorism strategy, though administration officials occasionally wandered into theology, as when former Secretary of State John Kerry called ISIS “apostates.”

If Trump’s speech is any indication, a debate about Islam still rages within his administration, and perhaps within himself. One can easily imagine Bannon whispering “Islamic terrorism” into one of the President’s ears, and national security adviser Gen. H.R. McMaster whispering “violent extremism” in the other.

On Sunday, Trump accommodated both.

CNN’s Jim Acosta and Jeremy Diamond contributed to this story.