President Donald Trump urged Muslims to combat a “crisis of Islamic extremism” and terrorism during a speech in Saudi Arabia Sunday during his first foreign trip as president.

Trump, who spoke to Arab and Muslim leaders in Riyadh, Saudi Arabia’s capital, appeared to shift his tone from past remarks on Muslims. Trump had previously blamed Muslims for the rise of extremist groups. But in his speech Sunday, Trump recognized the difference between “barbaric criminals” and “decent people” in Islam.

“Drive them out,” said Trump of extremists. “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 the earth.”

Read Trump’s full remarks in the transcript below:

Thank you. I would like to thank King Salman for his extraordinary words, and the magnificent Kingdom of Saudi Arabia for hosting today’s summit. I am honored to be received by such gracious hosts. I have always heard about the splendor of your country and the kindness of your citizens, but words do not do justice to the grandeur of this remarkable place and the incredible hospitality you have shown us from the moment we arrived.

You also hosted me in the treasured home of King Abdul Aziz, the founder of the kingdom who united your great people. Working alongside of another beloved leader, American President Franklin Roosevelt, King Abdul Aziz began the enduring partnership between our two countries. King Salman, your father would be very, very proud to see that you are continuing his legacy. And just as he opened the first chapter of our partnership, today we begin a new chapter that will bring lasting benefits to all of our citizens.

Let me now also extend my deep and heartfelt gratitude to each and every one of the distinguished heads of state who made this journey here today. You greatly honor us with your presence and I send the warmest regards from my country to yours. Thank you. I know that our time together will bring many blessings to both your people and to mine.

I stand before you as a representative of the American people to deliver a message of friendship and hope and love. That is why I chose to make my first foreign visit a trip to the heart of the Muslim world, to the nation that serves as custodian of the two holiest sites in the Islamic faith. In my inaugural address to the American people, I pledged to strengthen America’s oldest friendships and to build new partnerships in pursuit of peace. I also promised that America will not seek to impose our way of life on others, but to outstretch our hands in the spirit of cooperation and trust.

Our vision is one of peace, security, and prosperity in this region and all throughout the world. Our goal is a coalition of nations who share the aim of stamping out extremism and providing our children a hopeful future that does honor to god.

And so this historic and unprecedented gathering of leaders, unique in the history of nations, is a symbol to the world of our shared resolved (sic), and our military that will protect the safety of our people and enhance the security of (inaudible) and made record investments in our military that will protect the safety of our people and enhance the security of our wonderful friends and allies, many of whom are here (inaudible) — closer bonds of friendship, security, culture and commerce.

For Americans, this is a very exciting time. A new spirit of optimism is sweeping our country. In just a few months, we have created almost a million new jobs, added over $3 trillion in new value, lifted the burdens on American industry, and made record investments in our military that will protect the safety of our people and enhance the security of our wonderful friends and allies, many of whom are here today.

Now there is even more blessed news that I am pleased to share with you. My meetings with King Salman, the crown prince, and the deputy crown prince, have been filled with great warmth, good will, and tremendous cooperation. Yesterday, we signed historic agreements with the kingdom that will invest almost $400 billion in our two countries and create many hundreds of thousands of jobs in America and Saudi Arabia.

This landmark agreement includes the announcement of a $110 billion Saudi-funded defense purchase. And we will be sure to help our Saudi friends to get a good deal from our great American defense companies, the greatest anywhere in the world. This agreement will help the Saudi military to take a far greater role in security and operations having to do with security.

We’ve also started discussions with many of the countries present today on strengthening partnerships and forming new ones to advance security and stability across the Middle East and far beyond.

Later today, we will make history again with the opening of the new global center for combating extremist ideology located right here in the central part of the Islamic world. This ground-breaking new center represents a clear declaration that Muslim-majority countries must take the lead in combating radicalization, and I want to express our gratitude to King Salman for his strong demonstration and his absolutely incredible and powerful leadership.

I have had the pleasure of welcoming several of the leaders present today to the White House, and I look forward to working with all of you. America is a sovereign nation and our first priority is always the safety and security of our citizens. 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. Instead, we are here to offer partnership based on shared interests and values to pursue a better future (inaudible).

Here at this summit, we will discuss (inaudible). But above all, we must be united in pursuing the one goal that transcends every other consideration. That goal is to meet history’s great test, to conquer extremism and vanquish the forces terrorism brings with it every single time.

Young Muslim boys and girls should be able to grow up free from fear, safe from violence, and innocent of hatred. When young Muslim men and women should have the chance to build a new era of prosperity for themselves, it has to be done and we have to let them do it. With God’s help, this summit will mark the beginning of the end for those who practice terror and spread its vile creed. At the same time, we pray this special gathering may someday be remembered as the beginning of peace in the Middle East and maybe even all over the world. But this future can only be achieved through defeating terrorism and the ideology that drives it.

Few nations have been spared the violent reach of terrorism. America has suffered repeated barbaric attacks from the atrocities of September 11 to the devastation of the Boston bombings to the horrible killings in San Bernardino and Orlando. The nations of Europe have also endured unspeakable horror. So too have the nations of Africa and South America. India, Russia, China, and Australia have all been victims. But in sheer numbers, the deadliest toll has been exacted on the innocent people of Arab, Muslim, and Middle Eastern nations. They have borne the brunt of the killings and the worst of destruction in this wave of fanatical violence. Some estimates hold that more than 95 percent of the victims of terrorism are themselves Muslim. 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. The (inaudible) of ISIS, if you look at what’s happening, al Qaeda, Hezbollah, Hamas, and so many others must be counted not only in the number of dead; it also must be counted in generations of vanished dreams.

The Middle East is rich with natural beauty, vibrant cultures, and massive amounts of historic treasures. It should increasingly become one of the great global centers of commerce and opportunity. This region should not be a place from which refugees flee but to which newcomers flock. Saudi Arabia is home to the holiest sites in one of the world’s great faiths. Each year millions of Muslims come from around the world to Saudi Arabia to take part in the Hajj. In addition to ancient wonders, this country is also home to modern ones, including soaring achievements in architecture.

Egypt was a thriving center of learning and achievement thousands of years before other parts of the world. The wonders of Giza (ph), Luxor, and Alexandria are proud monuments to that ancient heritage. All over the world people dream of walking through the ruins of Petra in Jordan. Iraq was the cradle of civilization…