UNITED NATIONS (AP) -- In a closing dispatch to the world he's tried to shape, President Barack Obama conceded Tuesday that the United States and other major powers have only limited ability to solve the world's most profound problems, including Syria's civil war. He lamented the "cycles of conflict and suffering" that seem to kick in every time humanity finally seems to be getting it right.
"Perhaps that's our fate," Obama said in his last speech to the U.N. General Assembly.
Four months before leaving office, Obama called for a "course correction" to ensure that the unstoppable forces of globalization don't lead nations to entrench behind their borders and ignore the most vulnerable. He chided foreign leaders for stoking ethnic and religious divisions while faulting Russia for a brutish approach to its role on the world stage.
Still, Obama insisted it was critical not to gloss over "enormous progress" on economics and global cooperation that he said formed a template for tackling the problems of the future.
In a less-than-subtle jab at Donald Trump, the Republican running to replace him, Obama said, "A nation ringed by walls would only imprison itself."
Obama's parting words to the global body contained a grim assessment of the challenges he's leaving behind: a devastating refugee crisis, terrorism, financial inequality and a tendency to make immigrants and Muslims scapegoats. Across the Middle East, he said, "basic security, basic order has broken down."
"This is the paradox that defines our world today," Obama said. "A quarter-century after the end of the Cold War, the world is by many measures less violent and more prosperous than ever before. And yet our societies are filled with uncertainty and unease and strife."
This year's U.N. gathering has played out against the harrowing backdrop of the deepening civil war in Syria and the renewed failure of U.S. and Russian diplomatic efforts to stem the violence for any meaningful period of time. With no better alternatives, the U.S., Russia and others clung unconvincingly Tuesday to the notion that a week-old cease-fire was not moribund, even as Syria declared it over and the U.N. suspended all convoys of aid.
Obama acknowledged that the extremist and sectarian violence wreaking havoc in the Middle East and elsewhere "will not be quickly reversed." Still, he stuck faithfully to his insistence that diplomatic efforts and not military solutions are the key to resolving Syria's war and other conflicts.
"If we are honest, we know that no external power is going to be able to force different religious communities or ethnic communities to co-exist for long," Obama said. "Until basic questions are answered about how communities co-exist, the embers of extremism will continue to burn. Countless human beings will suffer."
The president was unabashed in his critique of Russia as he laid out his diagnosis of the world's ills. His tough talk illustrated how little progress has been made in reconciling the two powers' diverging interests that have allowed the Syria crisis to continue to fester.
"In a world that left the age of empire behind, we see Russia attempting to recover lost glory through force," Obama said.
A year ago, Obama stood at the same podium and declared anew that Syrian President Bashar Assad must leave power, while Russian President Vladimir Putin gave a dueling speech warning it would be a mistake to abandon Assad. Since then, Moscow's leverage in the conflict has strengthened significantly, buoyed by a Russian military intervention that bolstered Assad's standing without pulling it into the military "quagmire" that Obama had predicted.
White House officials said Obama had been mindful of the fact that his U.N. speech was one of his final opportunities to define his leadership on the world stage. At the heart of his approach, Obama said, is a belief that conflicts are best solved when nations cooperate and a willingness to engage with erstwhile adversaries like Cuba and Myanmar.
It's a theme that Democrat Hillary Clinton has put at the forefront of her presidential campaign - her slogan is "Stronger Together" - as she casts herself as the natural heir to Obama's legacy. The president peppered his speech with subtle references to Trump, his calls for building a wall on the Mexican border and his denigration of Muslims and immigrants.
Standing before the 193-member U.N. body, Obama sought in broad strokes to lay out a blueprint for addressing other unresolved conflicts. He called for the world to impose "consequences" on North Korea for its latest nuclear test and, in less direct terms, for China to abide by a recent U.N. tribunal ruling against its territorial designs in the South China Sea.
A day before meeting with Israeli Prime Minister Benjamin Netanyahu, he drew a parallel between the Israeli-Palestinian conflict and the need to respect racial minorities in the U.S.
"Surely, Israelis and Palestinians will be better off if Palestinians reject incitement and recognize the legitimacy of Israel, but Israel recognizes that it cannot permanently occupy and settle Palestinian land," Obama said.
Associated Press writer Kevin Freking in Washington contributed to this report.
Reach Josh Lederman on Twitter at http://twitter.com/joshledermanAP and Darlene Superville at http://twitter.com/dsupervilleap