Iran's ruling powers represent the "tip of the spear" of global terrorism, Saudi King Salman said in a speech on Sunday during a visit of U.S. President Donald Trump to the kingdom.
"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", Mr Trump said, speaking in an ornate room in the Saudi capital Riyadh.
"This is not a battle between different faiths, different sects or different civilizations", Trump said.
"A better future is only possible if your nations drive out the terrorists and drive out the extremists", Trump said.
Trump called on Muslim countries in the Middle East to bear more of the share in fighting terrorist groups including the Islamic State.
"Drive them out! Drive them out of your places of worship".
The president's address was the centrepiece of his two-day visit to Saudi Arabia, his first overseas trip since his January swearing-in.
In a March 2016 interview with CNN, Trump said: "I think Islam hates us". Drive them out of your community.More news: Woman calls cops worried semen in thermos might explode
More news: Trump's Saudi Weapons Deal May Worry Israel
More news: Step up in fight over 'Islamist extremism', US Prez tells Arab leaders
"Terrorism has spread across the world".
Trump received a warm welcome from Arab leaders, who set aside his campaign rhetoric about Muslims and focused on his desire to crack down on Iran's influence in the region, a commitment they found wanting in Obama.
Whether he would use his signature campaign phrase "radical Islamic terrorism" to describe the threat was unclear.
He referred instead to "Islamic extremism and the Islamists and Islamic terror of all kinds", though his prepared remarks cited only "Islamist terror groups" and "Islamist extremism". He also said "Islam hates us", called for a ban on Muslims entering the United States, floated possibly creating a database of Muslims in the United States and called for surveillance of USA mosques.
He 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.
The speech comes as Trump tries to escape the fallout from his May 9 firing of former FBI Director James Comey amid accusations he was trying to stop a federal investigation into his campaign's ties with Russian Federation a year ago.
On Sunday, however, standing before dozens of regional leaders, he said Islam was "one of the world's great faiths". The Washington Post said the probe had reached into the White House to include a Trump adviser, who was not named.