President Barack Obama used his farewell UN address Tuesday to castigate strongmen and populists, taking aim at Vladimir Putin's Soviet nostalgia and Donald Trump's rise at home.
Obama told the UN General Assembly that democracy remains the "firmest foundation for human progress" as he repudiated "crude populism" that has mushroomed in the United States and around the world.
"Some argue the future favors the strongman," Obama said, in remarks that will echo in the 2016 US campaign as much as the Kremlin or Tiananmen Square. "I believe this thinking is wrong."
"History shows that strongmen are then left with two paths: Permanent crackdown, which sparks strife at home, or scapegoating enemies abroad, which can lead to war."
Obama's solemn valedictory remarks came less than 50 days before Americans decide whether fellow Democrat Hillary Clinton, or Trump, the Republican nominee, will be his replacement.
The bellicose reality star has taken far-right positions on immigration and security on the campaign trail and into the US political mainstream.
Trump lashed out at Obama Monday after a spate of attacks in New York, New Jersey and Minnesota, saying "our country has been weak. We're letting people in by the thousands and tens of thousands."
Obama challenged that thinking, saying: "We have to open our hearts and do more to help refugees who are desperate for a home."
"We have to imagine what it would be like for our family, for our children if the unspeakable happened to us."
But he admitted there were "deep fault lines in the existing international order," not least in the Middle East where "basic order has broken down" and fundamentalists prey on social unease.
He admitted too that a "course correction" was needed to smooth the serrated edges of globalization.
"A world in which one percent of humanity controls as much wealth as the other 99 percent will never be stable," he warned.
- 'Past glories' -
Obama had a more direct message for his Russian counterpart, accusing Putin -- who has invaded Ukraine and deployed forces to Syria -- of using the military to gain global clout.
"In a world that left the age of empire behind, we see Russia attempting to recover lost glory through force," Obama said.
"If Russia continues to interfere in the affairs of its neighbors, it may be popular at home, it may fuel nationalist fervor for a time, but over time it is also going to diminish its stature and make its borders less secure."
By the same token, Obama warned China's increasingly powerful leader Xi Jinping that adhering to the rule of law offers "far greater stability than the militarization of a few rocks and reefs" in the South China Sea.
- Legacy on the line -
Eight years ago at his first UN General Assembly -- with America's reputation tattered by the Iraq war and George W. Bush's unilateralism -- Obama promised a "new era of engagement."
After two terms in the Oval Office a new Middle Eastern crisis, this time in Syria, threatens to sully Obama's effort to improve America's standing in the world.
Obama has been more cautious -- critics would say timid -- with the use of US power, refusing to intervene to topple Syrian President Bashar al-Assad's regime.
Before the UN, Obama restated the case for multilateralism and an America that knows the limits of its own might.
"I've noticed as president times when both America's adversaries and some of our allies believe all problems were either caused by Washington or could be solved by Washington."
"Perhaps too many in Washington believe that as well," he said to laughs from delegates.
And even as a Syrian ceasefire brokered by Washington lay in tatters, Obama insisted diplomacy -- not force -- is the only way to end the brutal five-year conflict.
"There's no ultimate military victory to be won, we're going to have to pursue the hard work of the diplomacy that aims to stop the violence and deliver aid to those in need," Obama said.
On Monday, the Syrian military declared the ceasefire over and 18 UN aid trucks were destroyed as they tried to bring relief to war-ravaged citizens near Aleppo.
Syria and Russia denied striking the convoy, with Moscow suggesting it may have caught fire.