President Barack Obama all but closed the book on his eight-year presidency during an impassioned farewell speech, touting the successes of his two terms in the White House, but warned against impending threats against democracy rooted in fear.

Mr Obama gave his forceful speech amid an a corrosive political climate as President-elect Donald Trump prepares to take office. Mr Trump campaigned on overturning many of the progressive policies the President enacted – the first of which being the Affordable Care Act; the fate immigration, environmental, and women’s issues hang in the balance.

The speech had somewhat of a cautionary tone throughout, as Mr Obama leaves office with a rather high approval rating at 56 per cent, he urged Americans that much work still lies ahead despite the progresses he made while in office. Amid the uncertainty, hostility, and aggressive push from the GOP to erase Mr Obama’s legacy, he took the opportunity to the sold out arena in his hometown of Chicago to defend his administration’s work, and espoused American ideals that many believe Mr Trump’s incoming administration – as well as the partisan rift in US government – threaten.

“Democracy can buckle when it gives into fear. So just as we as citizens must remain vigilant against external aggression, we must guard against a weakening of the values that make us who we are,” he said.

“That’s why I reject discrimination against Muslim Americans who are just as patriotic as we are. … That’s why we cannot withdraw from big global fights to expand democracy and humans rights and LGBT rights.”

He called out the tensions dividing Americans living in their ideological bubbles, making them susceptible to politicised inaccuracies – like false claims on social media, disinformation and propaganda, and other media based on beliefs rather than evidence.

The Obamas celebrate the Inauguration in 2009 and 2013 Show all 10 1 /10 The Obamas celebrate the Inauguration in 2009 and 2013 The Obamas celebrate the Inauguration in 2009 and 2013 WASHINGTON, DC - JANUARY 21: U.S. President Barack Obama and first lady Michelle Obama thank supporters during the Commander in Chief Inaugural Ball at the Walter E. Washington Convention Center on January 21, 2013 in Washington, DC. President Obama was sworn in for his second term earlier in the day. (Photo by Alex Wong/Getty Images) Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 U.S. President Barack Obama and first lady Michelle Obama arrive for the Inaugural Ball at the Walter Washington Convention Center January 21, 2013 in Washington, DC. President Obama started his second term by taking the Oath of Office earlier in the day during a ceremony on the West Front of the U.S. Capitol. Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 U.S. President Barack Obama and first lady Michelle Obama arrive for the Inaugural Ball at the Walter Washington Convention Center January 21, 2013 in Washington, DC. President Obama started his second term by taking the Oath of Office earlier in the day during a ceremony on the West Front of the U.S. Capitol. Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 U.S. President Barack Obama dances with first lady Michelle Obama during the Inaugural Ball January 21, 2013 at Walter E. Washington Convention Center in Washington, DC. Barack Obama was re-elected for a second term as President of the United States. Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 President Barack Obama and First Lady Michelle Obama ride in a golf cart an Inaugural ball 1/20/09 Official White House Photo by Pete Souza Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 US President Barack Obama and First Lady Michelle Obama dance during the Youth Inaugural Ball at the Hilton Washington in Washington, DC, January 20, 2009. Obama was sworn in as the 44th US president earlier in the day. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images) AFP/Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 (L-R) US President George W. Bush, First Lady Laura Bush, Michelle Obama and president-elect Barack Obama stand outside the Diplomatic entrance of the White House on November 10, 2008 in Washington. Obama is visiting the White House at the invitation of Bush ahead of his January 20, 2009 inauguration as the next president. AFP PHOTO/Tim SLOAN (Photo credit should read TIM SLOAN/AFP/Getty Images) Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 (L-R) US President George W. Bush, First Lady Laura Bush, Michelle Obama and president-elect Barack Obama stand outside the Diplomatic entrance of the White House on November 10, 2008 in Washington. Obama is visiting the White House at the invitation of Bush ahead of his January 20, 2009 inauguration as the next president. AFP PHOTO/Tim SLOAN (Photo credit should read TIM SLOAN/AFP/Getty Images) AFP/Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 US President George W. Bush and president-elect Barack Obama make their way through the Colonnade on November 10, 208 to a meeting in the Oval Office of the White House in Washington. Obama is visiting the White House at the invitation of Bush ahead of his January 20, 2009 inauguration as the next president. AFP PHOTO/Mandel NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images) AFP/Getty Images The Obamas celebrate the Inauguration in 2009 and 2013 performs during MTV & ServiceNation: Live From The Youth Inaugural Ball at the Hilton Washington on January 20, 2009 in Washington, DC. President Barack Obama was sworn in as the 44th President of the United States today, becoming the first African-American to be elected President of the US. Getty Images

“In the rise of naked partisanship and increasing economic and regional stratification, the splintering of our media into a channel for every taste, all this makes this great sorting seem natural, even inevitable,” he said. “And increasingly, we become so secure in our bubbles that we start accepting only information, whether it’s true or not, that fits our opinions, instead of basing our opinions on evidence that is out there.”

Mr Obama called on discussion between opposing voices, to reach compromise, and to step away from the computer screens and to speak to each other face-to-face: “If you’re tired of arguing with strangers on the Internet, try talking with one of them in real life.”

But the President, 10 days away from no longer holding that title, used the platform to confront the persistence of racism in the US – an experience that critics of racial discourse often wrote off because a black man took his seat in the Oval Office.

“After my election there was talk of a post-racial America. And such a vision, however well intended, was never realistic,” he said. “Race remains a potent and often divisive force in our society.”

“If every economic issue is framed as a struggle between a hardworking white middle class and an undeserving minority, then workers of all shades are going to be left fighting for scraps while the wealthy withdraw further into their private enclaves,” Mr Obama added.

A glimpse into the lives of the Obamas... via the White House Flickr account Show all 10 1 /10 A glimpse into the lives of the Obamas... via the White House Flickr account A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama's Personal Secretary Ferial Govashiri shows him how to make the sign of the anteater, mascot of the University of California, Irvine, prior to the UCI commencement at Angels Stadium in Anaheim, California, Saturday, 14 June, 2014. Official White House Photo by Pete Souza A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas First Lady Michelle Obama visits with families working on crafts at Maryland Fisher House IV at Walter Reed National Military Medical Center in Bethesda, Maryland, 14 April, 2014. Official White House Photo by Chuck Kennedy A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas First Lady Michelle Obama and Sex and the City actress Sarah Jessica Parker pose for a selfie in the Blue Room prior to the White House Talent Show on 20 May, 2014. Official White House Photo by Amanda Lucidon A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama jokes with a youngster while walking down Grand Avenue in St. Paul, Minnesota, 26 June, 2014. Official White House Photo by Pete Souza A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama, with First Lady Michelle Obama, greets a young boy during the Cannon Ball Flag Day Celebration at the Cannon Ball powwow grounds during a visit to the Standing Rock Sioux Tribe Reservation in Cannon Ball, N.D., June 13, 2014. Official White House Photo by Pete Souza A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama eats ice cream as the press covers his visit to the Grand Ole Creamery on Grand Avenue in St. Paul, Minnesota, 26 June, 2014. Official White House Photo by Pete Souza A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas First Lady Michelle Obama reacts to seeing her initials welded onto a steel plate by welder Michael Macomber during a keel-laying ceremony for the USS Illinois at the General Dynamics Electric Boat Shipyard in North Kingston, R.I., June 2, 2014. Official White House Photo by Chuck Kennedy A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama walks with U.S. Secret Service agents to Air Force One at Los Angeles International Airport in Los Angeles, California, 8 May, 2014. Official White House Photo by Pete Souza A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama holds a bobblehead doll of himself in the Outer Oval Office, 14 May, 2014. Official White House Photo by Pete Souza A glimpse into the lives of the Obamas... via the White House Flickr account The Obamas President Barack Obama talks with 8 year-old members of Girl Scout Troop 2612 from Tulsa, Oklahoma, during the 2014 White House Science Fair, in the Blue Room of the White House, 27 May, 2014. Official White House Photo by Pete Souza

He continued: “If we’re unwilling to invest in the children of immigrants, just because they don’t look like us, we will diminish the prospects of our own children – because those brown kids will represent a larger and larger share of America’s workforce.”

The President made references to his historic 2008 campaign, reciting “Yes we can” amid his call to action to Americans to help rebuild and restore democracy in the country.

“It falls to each of us to be those anxious jealous guardians of our democracy,” he said. “Embrace the joyous task we have been given to continually try to improve this great nation of ours because, for all our outward differences, we in fact all share the same proud type, the most important office in a democracy: citizen. Citizen.

“We must guard against a weakening of the values that make us who we are.” —@POTUS #ObamaFarewell https://t.co/pRwmeNAWmg — The White House (@WhiteHouse) January 11, 2017

“So, you see, that’s what our democracy demands. It needs you. Not just when there’s an election, not just when your own narrow interest is at stake, but over the full span of a lifetime.”

In his final curtain call, Mr Obama grew more emotional when he gave thanks to his wife, Michelle; daughters, Malia and Sasha, to his staffers; and to his vice president, Joe Biden, to whom he referred as a brother.

When the first black president of the United States left the stage, he assured Americans, his supporters, and the many marginalised people to whom he has devoted his entire political career that began in Chicago that his work was not done – and neither was theirs.

“My fellow Americans, it has been the honour of my life to serve you,” he said. “I won’t stop; in fact, I will be right there with you, as a citizen, for all my remaining days. …

“But for now, whether you are young or whether you’re young at heart, I do have one final ask of you as your president — the same thing I asked when you took a chance on me eight years ago.