In this Dec. 2, 2015, photo, Republican presidential candidate Donald Trump speaks during a campaign rally at the Prince William County Fair Ground in Manassas, Va. Trump tapped a man to be a senior business adviser to his real-estate empire even after the mans past involvement in a major mafia-linked stock fraud scheme became public. Felix Sater pleaded guilty to one count of racketeering in 1998. His conviction remained secret for nearly a decade as he worked as a government informant and an executive at the Bayrock Group, a real estate firm that partnered with Trump.  (AP Photo/Cliff Owen)
Cliff Owen/AP/File
In this Dec. 2, 2015, photo, Republican presidential candidate Donald Trump speaks during a campaign rally at the Prince William County Fair Ground in Manassas, Va. Trump tapped a man to be a senior business adviser to his real-estate empire even after the mans past involvement in a major mafia-linked stock fraud scheme became public. Felix Sater pleaded guilty to one count of racketeering in 1998. His conviction remained secret for nearly a decade as he worked as a government informant and an executive at the Bayrock Group, a real estate firm that partnered with Trump. (AP Photo/Cliff Owen)
Now playing
01:24
The things Donald Trump has said about Muslims
Now playing
01:08
Trump on foreign trip: We hit a home run
epa05985803 A handout picture provided by the Vatican newspaper L'Osservatore Romano shows Pope Francis (L) posing with US President Donald J. Trump on the occasion of their private audience, at the Vatican, 24 May 2017. Trump is at the Vaican and in Italy on a two day visit, ahead of his participation in a NATO summit in Brussels on 25 May.  EPA/OSSERVATORE ROMANO/HANDOUT  HANDOUT EDITORIAL USE ONLY/NO SALES
OSSERVATORE ROMANO/EPA
epa05985803 A handout picture provided by the Vatican newspaper L'Osservatore Romano shows Pope Francis (L) posing with US President Donald J. Trump on the occasion of their private audience, at the Vatican, 24 May 2017. Trump is at the Vaican and in Italy on a two day visit, ahead of his participation in a NATO summit in Brussels on 25 May. EPA/OSSERVATORE ROMANO/HANDOUT HANDOUT EDITORIAL USE ONLY/NO SALES
Now playing
02:42
Trump meets with the Pope, Spicer not invited
spicer not invited to visit pope
CNN
spicer not invited to visit pope
Now playing
01:35
Source: Spicer upset he could not meet Pope
VATICAN CITY, VATICAN - MARCH 29:  Pope Francis waves to the faithful as he leaves St. Peter's Square at the the end of Palm Sunday Mass on March 29, 2015 in Vatican City, Vatican. On Palm Sunday Christians celebrate Jesus' arrival into Jerusalem, where he was put to death. It marks the official beginning of Holy Week during which Christians observe the death of Christ before celebrations begin on Easter.  (Photo by Franco Origlia/Getty Images)
Franco Origlia/Getty Images Europe/Getty Images
VATICAN CITY, VATICAN - MARCH 29: Pope Francis waves to the faithful as he leaves St. Peter's Square at the the end of Palm Sunday Mass on March 29, 2015 in Vatican City, Vatican. On Palm Sunday Christians celebrate Jesus' arrival into Jerusalem, where he was put to death. It marks the official beginning of Holy Week during which Christians observe the death of Christ before celebrations begin on Easter. (Photo by Franco Origlia/Getty Images)
Now playing
02:01
Things Donald Trump has said about the Pope
Host TV
Now playing
01:20
President Trump, Pope Francis exchange gifts
Now playing
01:06
Trump: America supports eradication of killing
Trump radical islamic terrorism Muslim speech_00000000.jpg
Host TV
Trump radical islamic terrorism Muslim speech_00000000.jpg
Now playing
01:13
Trump: Muslims must confront 'Islamic terror'
Host TV
Now playing
01:02
Trump called a hypocrite for Saudi King bow
Now playing
02:46
Trump: Terror a battle between good and evil
Trump drive them out terrorists sot_00000000.jpg
Host TV
Trump drive them out terrorists sot_00000000.jpg
Now playing
01:00
Trump to Muslim world: Drive out terrorists
CNN
Now playing
01:23
Trump: I come to deliver message of love
Trump Tillerson dance Saudi Arabia _00000513.jpg
Host TV
Trump Tillerson dance Saudi Arabia _00000513.jpg
Now playing
00:56
Trump, Tillerson dance in Saudi Arabia
Melania Trump Ivanka Trump headscarf Saudi Arabia orig vstop dlewis_00000023.jpg
Host TV
Melania Trump Ivanka Trump headscarf Saudi Arabia orig vstop dlewis_00000023.jpg
Now playing
00:59
Melania, Ivanka Trump forgo headscarves
Saudi Arabia arms deal US Trump_00000000.jpg
Host TV
Saudi Arabia arms deal US Trump_00000000.jpg
Now playing
01:40
Trump signs arms deal with Saudi Arabia
Trump middle east business ties lee dnt nr_00000108.jpg
Saudi TV via Reuters
Trump middle east business ties lee dnt nr_00000108.jpg
Now playing
01:57
Trump's trip raises questions on business ties
(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.