US President Barack Obama has called on Americans to defend their democracy in his farewell speech in Chicago.

“By almost every measure, America is a better, stronger place” than it was eight years ago when he took office, he told thousands of supporters.

But he warned “democracy is threatened whenever we take it for granted”.

He implored Americans of all backgrounds to consider things from each other’s point of view, saying “we have to pay attention and listen”.

The country’s first black president, now 55, was first elected in 2008 on a message of hope and change.

His voice at moments catching with emotion, Obama recounted a presidency that saw setbacks as well as successes. Admitting candidly that political discourse has soured under his watch, Obama demanded that Americans renew efforts at reconciliation.

His successor, Donald Trump, has vowed to undo some of Mr Obama’s signature policies. He will be sworn into office on 20 January.