Barack Obama has addressed the United States and the world for the final time as president, in an emotional speech that listed the landmark achievements of his presidency and stressed unity as nation.

Capping his eight years in the White House, Obama returned on Tuesday to his adoptive hometown of Chicago to recast his "Yes we can" campaign credo as "Yes we did".

He summarised his achievements from the Iran nuclear deal to reforming healthcare. Much of the speech was dedicated to lifting up supporters shaken by President-elect Donald Trump's shock election.

Obama called on them to pick up the torch, fight for democracy and forge a new "social compact".

READ MORE: Barack Obama - So long, and thanks for all the speeches

"For all our outward differences, we are all in this together," he said warning that partisanship, racism, and inequality all threatened democracy. "We rise or fall as one."

"All of us, regardless of party, should throw ourselves into the task of rebuilding our democratic institutions."

The incoming Republican president has smashed conventions, vowed to efface Obama's legacy and hurled personal insults left and right, while in a virtually unprecedented move US intelligence has accused the Kremlin of seeking to tip the election in Trump's favour.

Democrats, cast into the political wilderness with the loss of the White House, the Senate and the House of Representatives plus a majority of statehouses, are struggling to regroup.



Obama painted the task ahead as a generational challenge.

"A faith in reason and enterprise, and the primacy of right over might" he said, had allowed the United States to "resist the lure of fascism and tyranny during the Great Depression, and build a post-World War II order with other democracies".



In comments that resonate as Americans ponder whether Russia helped to put Trump in the White House, Obama said "that order is now being challenged: first by violent fanatics who claim to speak for Islam; more recently by autocrats in foreign capitals who see free markets, open democracies, and civil society itself as a threat to their power.



"The peril each poses to our democracy is more far-reaching than a car bomb or a missile."

Message to supporters

Al Jazeera’s Patty Culhane, reporting from the event in Chicago, said Obama asked his supporters to defend his legacy and reminded Americans that they were all on the same team.

"The message he gave in his speech was: Don’t give up. Every single person here says that they don’t want to see Trump as president. And more than that, they feel that he is unfit for presidency. The common feeling here is fear," she said.

"Obama’s legacy is on the line as Trump is likely to try to unwind all things done during Obama’s presidency. He needs all these people to get involved to defend his achievements."

Obama was joined by First Lady Michelle Obama, Vice President Joe Biden and his wife Jill, who the president described as "family" in an emotional finale to his speech.

Wiping a tear from his eye, Obama paid poignant tribute to his own family, his daughter Malia who was present and Sasha who was not, and the first lady whom he addressed as his best friend.

THE STREAM: Barack Obama's legacy

"You took on a role you didn't ask for and made it your own with grace and grit and style and good humour," he said.

"A new generation sets its sights higher because it has you as a role model. You've made me proud. You've made the country proud."

With an approval rating hovering around 55 percent, according to a Quinnipiac University poll, Obama still carries considerable political weight.

Some 51 percent of Americans polled believe that Trump is doing a bad job as president-elect.