President Donald Trump softened his anti-Islamic campaign rhetoric in a speech in Saudi Arabia Sunday meant to reset U.S. relations with the Muslim world, and spur Arab leaders to do more to fight terrorism, in return for America’s help countering their nemesis Iran.

“This is not a battle between different faiths, different sects, or different civilizations,” Trump said in the lavish conference hall on his second day in Riyadh, Saudi Arabia. “This is a battle between good and evil.”

Trump, who just a year ago said he believed that “Islam hates us,” on Sunday called it “one of the world’s great faiths.” He echoed some of the more theologically diplomatic language of his predecessors, declaring, “Terrorists do not worship God, they worship death.”

Absent from the remarks was his trademark phrase “radical Islamic terrorism,” which he said as recently as February. But he also called on the Muslim world to confront “the crisis of Islamic extremism, the Islamists, and Islamic terror of all kinds,” and exhorted them to “DRIVE THEM OUT of your places of worship. DRIVE THEM OUT of your communities. DRIVE THEM OUT of your holy land, and DRIVE THEM OUT OF THIS EARTH,” capitalized as per the White House transcript of the speech.

The hodgepodge nature of the remarks shows Trump is still trying to feed his base, but also understands he’s got major fence-mending to do with the Arab allies Trump needs to prosecute the war on terrorism. It appears that Trump, or possibly his son-in-law Jared Kushner, has taken to heart arguments from inside the administration and from Arab diplomats that Trump’s campaign trail language and launching the still-legally-challenged travel ban had done damage to U.S.-Arab relations.

If the speech was a win for Kushner, who was the mastermind behind starting the president’s first overseas trip in Saudi Arabia, it came at the expense of other White House forces that have taken a harder line against Islam and pushed Trump to do the same. The speech was reportedly written by White House strategist Stephen Miller, the architect of the administration’s proposed ban on immigration from six Muslim-majority nations. But its language was softer than language on Islam used by aides such as National Security Council spokesman Michael Anton or White House counterterrorism adviser Sebastian Gorka, who see the war on terrorism as an ideological struggle against fundamentalist Islam.

The speech’s departure from Trump campaign rhetoric could also irk segments of Trump’s base that rallied behind his determination to flaunt political correctness and call out terrorism’s ostensible Muslim enablers. The speech has already drawn some mild criticism from the editor of Trump-backing Breitbart News’s London arm, who said the president was “wrong” in claiming the war on terrorism was not a struggle between “civilizations.”

In the address, Trump called his approach “principled realism,” and true to his so-far transactional foreign policy, ticked off how the U.S. was supporting Arab nations with military bases and investment throughout the region, including Saturday’s signing of an arms deal with Saudi Arabia he said could spell $400 billion in U.S. investment in the kingdom.

In return, Trump called on them to step up their fight against “radicalism.”

“The nations of the Middle East cannot wait for American power to crush this enemy for them,” Trump said, hinting at the U.S. public’s weariness of America’s longest war in Afghanistan, and its off-and-on fighting in Iraq. He called on the roughly 40 leaders assembled in Riyadh to “deny all territory to the foot soldiers of evil,” adding that it’s their “absolute duty to make sure terrorists find no sanctuary on their soil.”

Trump spelled out what they’d be getting in return: a White House that has firmly departed from the Obama administration’s willingness to negotiate with Iran. He slammed Tehran for spreading “destruction and chaos,” an echo of comments by Saudi King Salman according to the AP, who declared, “The Iranian regime has been the spearhead of global terrorism.”

“Just when Iranians voted overwhelmingly for openness and engagement with world, Trump clenched his fist and responded by calling for Iran's isolation,” said Trita Parsi, of the National Iranian American Council.

Trump did not make immediately clear how the U.S. would counter Iran. The administration has continued to honor the multilateral Iranian nuclear deal while a review of U.S. Iran policy moves ahead, but in the meantime, the White House has already moved to stiffen unilateral sanctions against Tehran to punish it for its continuing ballistic missiles tests, as well as its support of Houthi rebels in Yemen and the regime of Bashar al Assad in Syria.

The speech’s anti-Iran but pro-Islam tone was evocative of the measured addresses of George W. Bush to the Arab world, as he rallied Muslim support to battle al Qaeda after the attacks of 9/11. “Our war is not against Islam, or against faith practiced by the Muslim people. Our war is a war against evil," President George W. Bush said in 2002.

President Barack Obama carefully used the term “violent extremist,” a phrase his Homeland Security Secretary Jeh Johnson said was both more accurate—encompassing other violently motivated groups like white supremacists—and more palatable to Muslim American communities who said helped convince their people that they weren’t being targeted because of their religion.

In his 2009 Cairo speech, Obama tried to carefully thread the needle between acknowledging that terrorist groups have found a readily exportable ideology by hijacking Islam, and a nod to the majority of Muslims who see their religion as peaceful. “The relationship between Islam and the West includes centuries of co-existence and cooperation, but also conflict and religious wars,” he said. “Violent extremists have exploited these tensions in a small but potent minority of Muslims.”

That speech was derided as the low point of what Republicans and Americans such as Trump called Obama’s “apology tour.” It fed into conspiracy theories fueled by Trump that Obama may be Muslim. "He doesn't have a birth certificate. He may have one, but there's something on that, maybe religion, maybe it says he is a Muslim," Trump told Fox News in 2011.

Behind the scenes, a battle has been waged between National Security Adviser H.R. McMaster, and the authors of the travel ban aimed at 7 majority Muslim countries, including the speech’s main author Stephen Miller and advisors Steve Bannon and Sebastian Gorka. Echoing disgraced and departed National Security Adviser Mike Flynn, they argue the only way to defeat extremism in the Muslim world is to call the movement out by calling it “radical Muslim” terrorism.

McMaster, a general who has served alongside Muslim troops in Iraq and Afghanistan, knows incendiary language can make enemies of the very allies needed to defeat the enemy in their midst. Military officials familiar with McMaster’s thinking have scorned the “name and shame” argument, saying it only serves to alienate ordinary Muslims and make it harder for their leaders to work with the U.S. on counterterrorism and de-radicalization programs.

“We don’t need to call them a particular name to know who to kill,” one senior military official told The Daily Beast. The officials spoke anonymously in order to discuss the quiet campaign to change Trump’s language.

But McMaster’s point of view is at direct odds with those who helped Trump win the office.

Trump made political hay out of deriding Obama and candidate Hillary Clinton’s eschewing the phrase “radical Islamic terrorism” or some variant thereof.

“These are radical Islamic terrorists, and she won’t even mention the word, and nor will President Obama,” Trump said of Democratic presidential rival Hillary Clinton last year. “Now, to solve a problem, you have to be able to state what the problem is, or at least say the name.”

The focus on Islam as the root of global terrorism dovetails with public, often inflammatory statements by some of Trump’s top foreign policy advisers. “Islam is not a ‘religion of peace,’” NSC spokesman Michael Anton declared in a 2016 essay. “It’s a militant faith that exalts conversion by the sword and inspires thousands to acts of terror—and millions more to support and sympathize with terror.”

Advisor Gorka, a frequent critic of fundamentalist Islam and a student of radical terrorist groups and their ideologies, espouses a similar point of view in his 2016 book Defeating Jihad: The Winnable War.

“The Obama government has allowed its ideological preferences and beliefs to infect the function of national security,” Gorka wrote. Trump’s predecessor’s determination to purge the national security lexicon of mentions of Islam and Jihad betrayed an “Obama administration fantasyland, a world as absurd as the Bush-era belief that democracy is a ‘shake and bake’ exercise that can be achieved through the barrel of a gun. But Obama’s fantasy is much more dangerous.”

The setting of Trump’s speech on Sunday made Gorka’s views on Islamic radicalization particularly noteworthy: he has singled out Saudi Arabia in particular for its role in fomenting Islamic radicalization and terrorism.

“We made a strategic decision after World War II that Saudi Arabia would be our partner, would be our so-called ally, so we don’t want to talk about the fact that Saudi Arabia is, in part, responsible for the export of the most totalitarian ideology active today, which is global jihadism,” Gorka told Breitbart News, his former employer, in a 2016 interview.

Afghan Ambassador to the U.S. Mohib endorsed the speech. “As President Trump said, 'Every country in the region has an absolute duty to ensure that terrorists find no sanctuary on their soil,' he said in an email to The Daily Beast. He added that “We cannot win this historic battle between good and evil unless the world is united and acts as one."

The initial response from the wider Arab world has been muted. Up until now, Arab diplomats have been holding their fire when it comes to confronting the rhetorical issue directly, making their entreaties in private to Trump’s national security team.

“We hope Trump will figure it out eventually,” one of the officials told The Daily Beast, speaking anonymously to discuss the sensitive diplomatic influence campaign.

“Our relationship will help both sides to understand each other's—what's our needs, what's our constraints,” said one Iraqi official in advance of Trump’s speech, of his frequent use of the “radical Islam” term. “They might use this term because they understand Islam from this angle, but when they start dealing with Muslim people...they will use a different term.”