Watch President Donald Trump’s speech at the Arab Islamic American Summit in Riyadh, Saudi Arabia.

RIYADH, Saudi Arabia — President Donald Trump on Sunday implored Saudi Arabia and other Middle Eastern countries to extinguish “Islamic extremism” emanating from the region, describing a “battle between good and evil” rather than a clash between the West and Islam.

In a pointed departure from his predecessor, Trump all but promised he would not publicly admonish Mideast rulers for human rights violations and oppressive reigns.

“We are not here to lecture — we are not here to tell other people how to live, what to do, who to be, or how to worship,” Trump said, speaking in an ornate room in the Saudi capital. “Instead, we are here to offer partnership — based on shared interests and values — to pursue a better future for us all.”

The president’s address was the centerpiece of his two-day visit to Saudi Arabia, his first overseas trip since his January swearing-in. For Trump, the trip is a reprieve from the crush of controversies that have marred his young presidency and an attempt to reset his relationship with a region and a religion he fiercely criticized a candidate.

During the 2016 U.S. campaign, Trump mused about his belief that “Islam hates us.” But on Sunday, standing before dozens of regional leaders, he said Islam was “one of the world’s great faiths.”

While running for the job he now holds, Trump heartily criticized President Barack Obama for not using the term “radical Islamic extremism” and said that refusal indicated that Obama did not understand America’s enemy. In his Saudi speech, Trump condemned “Islamic extremism,” ”Islamists,” and “Islamic terror,” but not once uttered the precise phrase he pressed Obama on.

Trump made no mention of the disputed travel ban, signed days after he took office, that temporarily banned immigration to the U.S. from seven majority Muslim countries: Iraq, Iran, Syria, Sudan, Libya, Somalia, and Yemen. Both the original order and a second directive that dropped Iraq from the banned list have been blocked by the courts.

In some ways, Trump delivered a conventional speech for an American politician. He pledged deeper ties with the Middle East to tackle terrorism and encouraged more economic development in the region. He heralded the ambitions of the region’s youth and warned that the scourge of extremism could tarnish their future.

Trump offered few indications of whether he planned to shift U.S. policy to better fight terrorism. There were no promises of new financial investment or announcements of increased U.S. military presence in the region. The president put much of the onus for combating extremists on Mideast leaders: “Drive them out of your places of worship. Drive them out of your communities.”

White House officials said they considered Trump’s address to be a counterweight to Obama’s debut speech to the Muslim world in 2009 in Cairo. Obama called for understanding and acknowledged some of America’s missteps in the region. His speech was denounced by many Republicans and criticized by a number of America’s Middle East allies as being a sort of apology.

Trump’s remarks came in a meeting with dozens of regional leaders who gathered in Riyadh for a summit with Trump and Saudi King Salman.

The king has lavished praise and all the trappings of a royal welcome on the new American president, welcoming in particular Trump’s pledge to be tougher on Iran than Obama was. Indeed, Trump and Salman were in lockstep on the threat Iran poses to the region when they addressed their fellow leaders: Trump accused Iran of “destruction and chaos” and the king said its rival “has been the spearhead of global terrorism.”

The Saudis’ warm embrace was welcome change for the besieged White House. Officials spent the days before Trump’s departure dealing with a steady stream of revelations about the federal investigation into his campaign’s possible ties to Russia and the fallout from his firing of FBI Director James Comey.

The president, who is known to tear asunder the White House’s plans with a provocative tweet or offhand comment, has largely stuck to the script for opening days of the trip. Apart from Sunday’s address, he’s made no substantial remarks, other than exchanging pleasantries with other leaders.

Before the speech, Trump held individual meetings with leaders of several nations, including Egypt and Qatar.

His meeting with Egyptian President Abdel-Fattah el-Sissi underscored their burgeoning kinship. Trump praised el-Sissi for the April release of Egyptian-American charity worker Aya Hijazi, detained in the country for nearly three years.

El-Sissi invited Trump to visit him in Egypt, adding, “You are a unique personality that is capable of doing the impossible.” As the participants laughed, Trump responded: “I agree.”

The president then complimented el-Sissi’s choice of footwear: “Love your shoes. Boy, those shoes” after their brief remarks to the media.

From Saudi Arabia, Trump was scheduled to visit Israel for meetings with Prime Minister Benjamin Netanyahu and Palestinian Authority President Mahmoud Abbas. He’ll also go to the Vatican for an audience with Pope Francis, to Brussels for a NATO summit and to Sicily for a meeting of leaders of the Group of Seven major industrial nations.

This report was written by Jonathan Lemire and Julie Pace of the Associated Press. Associated Press writers Vivian Salama, Ken Thomas and Jill Colvin in Washington contributed to this report.