In his last address before the United Nations Tuesday, President Barack Obama acknowledged that globalism has led “to a collision of cultures” but urged countries to embrace liberal democracy and internationalization.

Obama told world leaders to recognize that violence and poverty are at historic lows.

“I believe that we need to acknowledge these achievements in order to carry this progress forward,” Obama said. “In order to move forward, though, we do have to acknowledge that the existing path to global integration requires a course correction.”

The president said those who trumpet the benefit of globalization have ignored inequalities in their countries and “the enduring appeal of ethnic and sectarian identities.” Obama added that many government institutions around the world have been unfit to handle the changes globalization has brought.

Due to this, Obama said “alternative visions of the world have pressed forward in both the wealthiest countries and the poorest.” The president pointed to the rise of religious fundamentalism, nationalism, and what he called a “crude populism.”

Obama posed these alternatives as being “self-defeating” due to a global-supply chain and increased technology and travel. “Today a nation ringed by walls would only imprison itself,” Obama said in a thinly veiled shot at Republican nominee Donald Trump.

The president did take time to criticize globalism. He mentioned that Brussels, the European Union’s capitol, became “isolated” from the people it governs. “Globalization combined with rapid progress in technology has also weakened the position of workers in their ability to secure a decent wage,” Obama said.

[dcquiz] “I understand that the gaps between rich and poor are not new, but just as the child in the slum today can see the skyscraper nearby, technology now allows any person with a smart phone to see how the most privileged among us live and the contrast between their lives and others,” Obama continued.

His solution to these problems is a continued embrace of globalization with a focus on closing the gap between rich and poor and promoting liberal human rights. The president acknowledged that the address wasn’t the proper forum for a specific blue-print and spoke vaguely of investing in the future of citizens, through education or promoting “open societies.”

Obama said that, “given the difficulty in forging true democracy in the face of these pressures, it is no surprise that some argue the future favors the strong man.” He unsurprisingly rejected this idea and said that “history shows that strong men are then left with two paths” permanent crackdown or scapegoating enemies abroad.

“We must reject any form of fundamentalism, or racism or a belief in ethnic superiority that makes our traditional identities irreconcilable with modernity,” Obama said before the U.N. “It’s a truism that globalism has led to a collision of cultures.”

The president used France as an example of this collision of cultures. He said, “We see liberal societies express opposition when women choose to cover themselves. We see protests responding to western newspaper cartoons that caricature the prophet Mohammed.”

When Obama spoke about the violence and extremism in the Middle East he continued his theme of accepting globalism. “The world is too small for us to simply be able to build a wall and keep it from effecting our own societies,” the president said.

The idea of a border wall seemed to be helpful to Obama’s idea that the globalism we now face is impossible to reject. “We can’t combat a disease like Zika that recognizes no border — mosquitoes don’t respect walls — unless we make permanent the same urgency we brought to bear against Ebola,” the president said.

The president touched lightly on topic of refugees, encouraging countries to “open their hearts” to those fleeing violence. He will speak more on the issue later Tuesday afternoon during the Leaders’ Summit on Refugees.

To close his address Obama evoked the words of Martin Luther King Jr. “Sitting in a prison cell, a young Martin Luther King Jr. wrote that ‘Human progress never rolls on the wheels of inevitability; it comes through the tireless efforts of men willing to be coworkers with God.'”

Obama said, “I have learned that our identities do not have to be defined by putting someone else down, but can be enhanced by lifting somebody else up.”

“And embrace of these principles as universal doesn’t weaken my particular pride, my particular love for America. It strengthens it,” He continued. “This is what I believe, that all of us can be coworkers with God. And our leadership and our governments and this United Nations should reflect this irreducible truth.”