US President Barack Obama gave a farewell speech in Chicago, reflecting on his time in office.
“By almost every measure, America is a better, stronger place” than it was eight years ago, Mr Obama said.
He implored Americans of all backgrounds to consider things from each others 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 successor, President-elect Donald Trump, has vowed to undo some of Mr Obama’s signature policies.
Mr Trump will be sworn into office on 20 January.
Striking an upbeat tone, Mr Obama said that the peaceful transfer of power between presidents was a “hallmark” of American democracy.
But, he said, “our democracy won’t work without a sense that everyone has economic opportunity”.
‘Back to where it all started’
Returning to Chicago, where he first declared victory in 2008, Mr Obama is delivering a parting message to Americans after a divisive and vicious election campaign which led to Mr Trump’s victory over Democrat Hillary Clinton.
He had said he wanted to return to “where it all started” for him and First Lady Michelle Obama, instead of delivering the speech from the White House.
The speech will aim to speak to everyone in America, including Trump supporters, White House officials had earlier said.
Mr Obama’s trip to Chicago is his last as president, and his 445th journey aboard Air Force One.
He said it was in the city as a young man, “still trying to figure out who I was, still searching for purpose in my life”, that he “witnesses the power of faith and dignity of working people in the face of struggle and loss”.
More than 20,000 people had been expected to attend the farewell address at McCormick Place, the largest convention centre in North America and the venue for Mr Obama’s speech after he defeated Mitt Romney in the 2012 election.
The tickets were given out free, but were selling online for more than $1,000 (£820) each hours ahead of the speech.
First Lady Michelle Obama, Vice President Joe Biden and his wife Jill Biden are all in attendance.
Mr Obama was also expected to try and rally the spirits of beleaguered Democrats, still reeling from Hillary Clinton’s election loss in November.
“It’s not going to be like an anti-Trump speech, it’s not going to be a red meat, rabble-rousing thing, it will be statesman-like but it will also be true to him,” lead speechwriter Cody Keenan told the AFP news agency
“It will tell a story.”
Democrat supporters gathering in Chicago told the BBC they were looking to Mr Obama to provide some hope and guidance for them.
“I know that he will squash some of the fear that America has about the President-elect Trump,” Aretha Glasper said. “I know that he’s gracious enough to offer his help going forward.”
The speech has gone through various drafts since Mr Keenan first began penning it last month as Mr Obama spent the Christmas holiday in Hawaii. Speechwriters have looked to back to significant speeches by the president for inspiration, including his 2004 address at the Democratic National Convention.
Presidential farewell addresses have long been an American political tradition.
Former Presidents George W Bush and Bill Clinton delivered theirs from the White House, while George Bush Snr gave his at the West Point military academy.
President Obama leaves is viewed favourably by 57% of Americans, according to an Associated Press-NORC Center for Public Affairs Research poll, a similar level to Bill Clinton when he left office.