US President Barack Obama delivered an historic speech at the U.N. on Tuesday, saying that Israel must leave Palestinian land.

Obama told the 71st session of the United Nations General Assembly in New York that the time has come for Israel to recognize that it cannot “permanently occupy and settle Palestinian land.”

“Surely Israelis and Palestinians will be better off if Palestinians reject incitement and recognize the legitimacy of Israel. But Israel must recognize that it cannot permanently occupy and settle Palestinian land. We all have to do better,” Obama told the U.N.

Timesofisrael.com reports:

In his wide-ranging address, Obama sought to use his last appearance before the global body to define how his leadership had put the world on a better trajectory over the last eight years. At the heart of that approach, Obama said, is the notion that conflicts are best solved when nations cooperate.

The president cited his administration’s outreach to former adversaries Cuba and Myanmar as key examples of progress. He also cited the resolution last year “of the Iranian nuclear issue through diplomacy” as a key achievement over the past eight years.

In his address, Obama spoke of a “less violent” and “more prosperous” world but one rife with “uncertainty, unease and strife,” as nations struggle with a devastating refugee crisis, terrorism and a breakdown of order in the Middle East.

“Despite enormous progress, governing has become more difficult, and tensions are more quick to surface,” he said, adding that the world now faces a choice, to “press forward with a better model for cooperation and integration, or retreat into a world that is sharply divided.”

“This is the paradox that defines the world today,” Obama said. “We must go forward, and not backward.”

The US president also conceded that “bloodletting” throughout the Middle East will not be easily resolved and insisted the Syrian civil war could only be ended through diplomacy.

“The mindset of sectarianism and extremism and bloodletting that has been taking place [in the Middle East] will not be quickly reversed,” Obama said adding that “no external force is going to force communities to coexist,” and that the international community must “work with those who seek to build, rather than destroy.”

In Syria, where the civil war has claimed the lives of over 300,000 people, Obama said that there was “no ultimate military victory to be won,” and that the world must pursue the “hard work of diplomacy and humanitarian assistance.”

He added that the there was a was a “military component – it means being united and relentless against ISIL [the Islamic State terror group].”

In a subtle reference to Republican nominee Donald Trump, Obama also bemoaned how terrorist networks had spread their ideology on social media, spurring anger toward “innocent immigrants and Muslims.”

“We must reject any forms of fundamentalism, or racism or a belief in ethnic superiority” that is “irreconcilable with modernity,” said Obama.

Earlier on Tuesday, UN secretary-general Ban Ki-moon told the UN General Assembly that the only solution to the Israeli-Palestinian conflict would be a two-state solution, and that the one-state option would “spell doom” for both sides.

“This is madness. Replacing a two-state solution with a one-state construct would spell doom: denying Palestinians their freedom and rightful future, and pushing Israel further from its vision of a Jewish democracy towards greater global isolation,” said Ban.