Media playback is unsupported on your device Media caption Trump tells Muslim nations to "Drive out the terrorists"

US President Donald Trump has urged Muslim countries to take the lead in combating radicalisation in a major speech in Saudi Arabia.

"Drive them out of this earth," he told regional leaders in Riyadh, as part of his first official trip abroad.

Mr Trump blamed Iran, Saudi Arabia's rival, for instability in the region.

His speech is seen as an attempted reset with Muslims after his harsh campaign rhetoric stirred concerns in the Islamic world.

Mr Trump had previously suggested he would be open to creating a database of all the Muslims in the US. And he had also called for Muslims to be temporarily banned from entering the US over security concerns.

But, speaking in the Saudi capital to leaders of 55 Muslim-majority countries, Mr Trump called this a "new chapter", saying he was not there to "lecture" them or impose the American way of life.

The fight against extremism, he added, was not a battle between different faiths or civilizations: "This is a battle between good and evil".

Media playback is unsupported on your device Media caption Melania Trump didn't wear a headscarf, but does it matter?

"A better future is only possible if your nations drive out the terrorists, and drive out the extremists".

But, he added, the countries could not wait for "American power" to act, and had to "fulfil their part of the burden".

He singled out Iran for criticism, accusing it of fuelling sectarian conflict and supporting "unspeakable crimes" by the government of President Bashar al-Assad in Syria.

Responding on Twitter, Iran's Foreign Minister Mohammad Javad Zarif mockingly called Saudi Arabia "that bastion of democracy and moderation" and suggested that the US was milking the country for billions of dollars in newly-signed arms deals worth more than $350bn (£270bn).

A tough message: By Frank Gardner, BBC Security correspondent, Riyadh

Image copyright Reuters

Behind the lavish praise heaped on his hosts, President Trump used this speech to deliver a tough message to Arab and Muslim governments: deal with the ideology that fuels terrorism now or live with it for generations to come.

He went out of his way to avoid the sort of inflammatory language he's more usually known for. His repeated condemnation of Saudi Arabia's regional rival Iran will have pleased the Gulf Arab leaders listening.

Unlike his predecessor, Barack Obama, this US president made no mention of human rights or democracy. But he did condemn the oppression of women.

And amongst several cynical reactions to the speech from around the region on social media, some have pointed out that here in Saudi Arabia women are forbidden to drive and there are no parliamentary elections. In Iran, the country accused by Mr Trump of being behind much of the current terrorism across the Middle East, they have just had a free election and women are free to drive.

Analysts said the speech was a change for Mr Trump, who is trying to redefine his relationship with the Muslim world after several controversial remarks, including an interview last year in which he famously said: "I think Islam hates us."

His highly anticipated address did not include the phrase "radical Islamic terrorism", which he had used before and is considered offensive by many Muslims. A transcript of the text published on his Facebook page included a mention of "Islamist extremism" and "Islamist terror groups".

But in his speech Mr Trump said: "That means honestly confronting the crisis of Islamic extremism and the Islamists and Islamic terror of all kinds." It was not immediately clear if he stumbled over the word or decided to change the script.

Islamist and Islamic: The difference

Islamist: Referring to those who aim to reorder government and society in accordance with Islamic law, or Sharia

Referring to those who aim to reorder government and society in accordance with Islamic law, or Sharia Islamic: Relating to Islam

Meanwhile, the US and six Gulf states announced a deal to co-ordinate their efforts aimed at cutting off sources of money for extremist groups, including so-called Islamic State (IS).

Media playback is unsupported on your device Media caption Donald Trump sways along with a traditional Saudi sword dance

The countries - Saudi Arabia, Qatar, Kuwait, Oman, the United Arab Emirates and Bahrain - are involved in the fight against the militants, but have been accused of backing the group and other Sunni militants - most notably in a 2014 email by Hillary Clinton released by Wikileaks.

"The unique piece of it is that every single one of them are signatories on how they're responsible and will actually prosecute the financing of terrorism, including individuals," said Dina Powell, US Deputy National Security Adviser for Strategy.

The agenda for the rest of Mr Trump's trip

Mr Trump's eight-day trip will also take in Israel, the Palestinian territories, Brussels, the Vatican, and Sicily.

The president's visit has been overshadowed by his political difficulties at home, namely the fallout over his sacking of FBI chief James Comey.