Chicago (CNN) Popular but politically humbled, President Barack Obama said goodbye to the nation Tuesday night, declaring during his farewell address that he hasn't abandoned his vision of progressive change but warning that it now comes with a new set of caveats.

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.

"It falls to each of us to be those anxious, jealous guardians of our democracy," the President said. "To embrace the joyous task we've been given to continually try to improve this great nation of ours."

Obama also stressed solidarity despite a presidency sometimes at odds with Congress.

"Democracy does not require uniformity," Obama said. "Our founders quarreled and compromised, and expected us to do the same. But they knew that democracy does require a basic sense of solidarity -- the idea that for all our outward differences, we are all in this together; that we rise or fall as one."

In a concession that, for now, his brand of progressive politics is stalled in Washington, Obama admitted "for every two steps forward, it often feels we take one step back."

He implored his backers to be vigilant in protecting basic American values he warned could come under siege.

"Democracy can buckle when we give in to fear," he said. "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."

And he warned against turning inward, telling Democrats that only by involving themselves in a real political discourse could they hope to renew the hopeful vision he brought to the White House eight years ago.

"After eight years as your President, I still believe that," he went on. "And it's not just my belief. It's the beating heart of our American idea -- our bold experiment in self-government."

Capstone

Obama's speech is the capstone of a months-long farewell tour, manifested in extended magazine interviews, lengthy television sit-downs, and the White House's own efforts to document the President's waning administration. Through it all, Obama has sought to highlight the achievements of his presidency using statistics showing the country better off now than eight years ago.

As he spoke before a rowdy crowd of supporters, Obama was interrupted often with screams of "I Love you Obama." When a protester holding a "Pardon All of Us" sign, chants of "four more years" drowned out the shouts.

Obama sought to corral his crowd, listing the accomplishments of the last eight years ranging from health care to marriage equality, all while insisting that his work isn't finished.

He recognized his successor Donald Trump, saying he was committed to a peaceful transition of power. But he warned that going forward Democrats shouldn't fall in line with their commander-in-chief.

Obama, who has addressed race with varying degrees of force during his time in office, used his farewell to insist Americans work harder to understand each other's struggles. After presiding over eight years that saw race relations enter a fraught new era, Obama demanded that differences be identified and reconciled.

"Brown kids will represent a larger share of America's workforce" in the years ahead, Obama proclaimed, calling for better rules that will help the children of immigrants succeed.

He warned that "laws alone won't be enough" in resolving persistent differences between Americans.

"Hearts must change," he said.

He called on African-Americans and minorities to view with empathy "the middle-aged white man who from the outside may seem like he's got all the advantages, but who's seen his world upended by economic, cultural, and technological change."

Photos: Malia and Sasha Obama: 2008-present Photos: Malia and Sasha Obama: 2008-present Barack Obama, then a Democratic presidential hopeful, addresses voters at a January 2008 rally in Des Moines, Iowa, accompanied by his wife, Michelle, and daughters Malia and Sasha, then 9 and 6, respectively. Click through the gallery to see how the Obama girls grew up before the nation after their father's 2008 election as President. Hide Caption 1 of 34 Photos: Malia and Sasha Obama: 2008-present The family hands out food for Thanksgiving in their hometown of Chicago in November 2008 shortly after Barack Obama's campaign victory. Hide Caption 2 of 34 Photos: Malia and Sasha Obama: 2008-present Obama takes the oath of office with his family by his side on January 20, 2009, at the US Capitol. Sasha is at far right, next to Malia. Hide Caption 3 of 34 Photos: Malia and Sasha Obama: 2008-present The President takes Malia, left, and Sasha for a walk with their new dog, Bo, on the South Lawn of the White House in April 2009. The Portuguese water dog was a gift from Sen. Edward Kennedy. The first family chose the purebreed puppy largely because of Malia's allergies. Hide Caption 4 of 34 Photos: Malia and Sasha Obama: 2008-present Sasha watches her dad from the Truman Balcony after he arrives on the South Lawn of the White House in May 2009. Hide Caption 5 of 34 Photos: Malia and Sasha Obama: 2008-present Sasha and Malia play with Bo as they wait for their dad's helicopter to land at the White House in September 2009. Hide Caption 6 of 34 Photos: Malia and Sasha Obama: 2008-present Sasha looks at a turkey named Courage during a Thanksgiving tradition to "pardon" a turkey in November 2009. Hide Caption 7 of 34 Photos: Malia and Sasha Obama: 2008-present Malia and Sasha read a book to children during a visit to a hospital in Washington in December 2009. Hide Caption 8 of 34 Photos: Malia and Sasha Obama: 2008-present With an assist from his wife and daughters, Obama presses the button to light the National Christmas Tree on December 2009 at the Ellipse near the White House. Hide Caption 9 of 34 Photos: Malia and Sasha Obama: 2008-present Sasha and her mother serve meals to the needy in Washington in January 2010. The President and Malia also helped in the dining room. Hide Caption 10 of 34 Photos: Malia and Sasha Obama: 2008-present President Obama and Sasha watch a WNBA game in Washington in August 2010. Hide Caption 11 of 34 Photos: Malia and Sasha Obama: 2008-present The first lady and her daughters read to children as they visit a community center in Johannesburg in June 2011. Hide Caption 12 of 34 Photos: Malia and Sasha Obama: 2008-present The first family greets children dressed as elves at a museum in Washington in December 2011. Hide Caption 13 of 34 Photos: Malia and Sasha Obama: 2008-present The President walks with his daughters after a visit to Sea Life Park in Hawaii in December 2011. Hide Caption 14 of 34 Photos: Malia and Sasha Obama: 2008-present The first family sings with Kermit the Frog at the National Tree lighting ceremony in December 2011. Hide Caption 15 of 34 Photos: Malia and Sasha Obama: 2008-present Obama gives Malia a hug and a kiss after not kissing his wife, Michelle, on the "Kiss Cam" at the Verizon Center in July 2012. Hide Caption 16 of 34 Photos: Malia and Sasha Obama: 2008-present The first family walks across Lafayette Park to attend Sunday services in Washington in August 2012. Hide Caption 17 of 34 Photos: Malia and Sasha Obama: 2008-present The President and his daughters watch on television as the first lady gives a speech at the Democratic National Convention in September 2012. Hide Caption 18 of 34 Photos: Malia and Sasha Obama: 2008-present President Obama greets his wife and daughters after being sworn in for his second term in January 2013. Hide Caption 19 of 34 Photos: Malia and Sasha Obama: 2008-present The first daughters take a selfie of themselves during the presidential inaugural parade on January 21, 2013, in Washington. Malia was 14 and Sasha 11 at the time of their father's second inaugural. Hide Caption 20 of 34 Photos: Malia and Sasha Obama: 2008-present Obama, with Sasha, center, and Malia, pays for a purchase at the Politics & Prose bookstore in northwest Washington in November 2013. Hide Caption 21 of 34 Photos: Malia and Sasha Obama: 2008-present The first lady and her daughters receive an escort from Patrick Prendergast, provost and president of Trinity College Dublin, during their June 2013 visit to Ireland. Hide Caption 22 of 34 Photos: Malia and Sasha Obama: 2008-present The first family sings during the finale of TNT's "Christmas in Washington" program in December 2013. Michelle Obama's mother, Marian Robinson, and the program's host, actor Hugh Jackman, are at left. Time Warner is the parent company of TNT and CNN. Hide Caption 23 of 34 Photos: Malia and Sasha Obama: 2008-present Obama and Sasha make burritos at DC Central Kitchen as part of a service project on Martin Luther King Jr. Day in January 2014. Hide Caption 24 of 34 Photos: Malia and Sasha Obama: 2008-present Michelle Obama shares a light moment with her daughters as they visit the Mutianyu section of the Great Wall of China in March 2014. Hide Caption 25 of 34 Photos: Malia and Sasha Obama: 2008-present The Obamas head to Marine One as they leave the White House for a wedding in August 2014. Hide Caption 26 of 34 Photos: Malia and Sasha Obama: 2008-present The first family takes the stage during a taping of the "Christmas in Washington" program in December 2014. Hide Caption 27 of 34 Photos: Malia and Sasha Obama: 2008-present Malia and Sasha arrive at the Edmund Pettus Bridge in Selma, Alabama, in March 2015. The Obamas were in Alabama to commemorate the 50th anniversary of Bloody Sunday , when state troopers clubbed and tear-gassed civil rights marchers headed to Montgomery. Hide Caption 28 of 34 Photos: Malia and Sasha Obama: 2008-present Sasha, left, and Malia join their dad as he delivers remarks for the turkey pardoning ceremony in the Rose Garden at the White House in November 2015. Hide Caption 29 of 34 Photos: Malia and Sasha Obama: 2008-present Malia and Sasha Obama, grandmother Marian Robinson, the first lady and President attend the National Christmas Tree lighting ceremony on the Ellipse south of the White House in December 2015. Hide Caption 30 of 34 Photos: Malia and Sasha Obama: 2008-present Malia attends a state dinner at the White House in March 2016. The dinner was in honor of Canadian Prime Minister Justin Trudeau and first lady Sophie Gregoire-Trudeau. Hide Caption 31 of 34 Photos: Malia and Sasha Obama: 2008-present Sasha attends the Trudeau state dinner in March 2016. Hide Caption 32 of 34 Photos: Malia and Sasha Obama: 2008-present Obama hugs Malia at the White House Fourth of July party in 2016. She was celebrating her 18th birthday during the party, which included musicians Janelle Monae and Kendrick Lamar. Hide Caption 33 of 34 Photos: Malia and Sasha Obama: 2008-present Obama and the first lady head to the tarmac to board Air Force One with their daughters Malia, right, and Sasha, left, at Air Station Cape Cod in Massachusetts in August 2016. Hide Caption 34 of 34

And he urged whites to regard the protests of minorities as a fight "not demanding special treatment, but the equal treatment our Founders promised."

"Regardless of the station we occupy, we have to try harder," Obama said. "To start with the premise that each of our fellow citizens loves this country just as much as we do; that they value hard work and family like we do; that their children are just as curious and hopeful and worthy of love as our own."

Capitalize on goodwill

In coming to Chicago, Obama hoped to capitalize on a well of goodwill that's expanded in the final year of his tenure. He discarded the staid Oval Office or East Room for his last formal set of remarks, choosing instead the city where his political rise began and where he declared victory in 2008 and 2012.

Inside a vast convention hall packed with more than 20,000 of his most ardent supporters and former staffers, the mood was wistful. Ahead of his address, aides described the normally unsentimental commander in chief as nostalgic.

Over the past several weeks, Obama has offered a rational view of Trump's election and rarely let on to any apprehension about his future as an ex-president. First lady Michelle Obama has articulated a more candid view in a scaled-back version of her own farewell. She sat for an hour-long interview with Oprah Winfrey, frankly admitting that Democrats were now "feeling what not having hope feels like."

JUST WATCHED Michelle Obama's emotional final speech Replay More Videos ... MUST WATCH Michelle Obama's emotional final speech 01:52

And she became emotional during her final set of formal remarks at the White House Friday, her voice quaking and eyes welling with tears as she told a crowd of educators: "I hope I made you proud."

During his speech Tuesday, Obama voice quaked when describing his wife's service.

"You took on a role you didn't ask for and made it your own with grace and grit and style and good humor," he said. "You made the White House a place that belongs to everybody."

JUST WATCHED Obama tears up talking about Michelle Replay More Videos ... MUST WATCH Obama tears up talking about Michelle 02:00

Planning for months

The President had been planning his speech for months, aides said, formulating the broad themes while on vacation over the holidays in Hawaii and developing drafts starting last week.

He told aides months ago that he preferred to deliver his farewell address in his hometown, a first for a departing President. George W. Bush, unpopular and facing a financial crisis, delivered his final prime-time address in the White House East Room to a crowd of 200 supporters and aides.

'Last Days of the Obama White House' Watch CNN Films' premiere of its documentary, "The End: Inside the Last Days of the Obama White House," Wed. Jan. 18, at 9p ET/PT on CNN.

Bill Clinton, Ronald Reagan and Jimmy Carter all used the Oval Office -- a setting Obama has long spurned for formal remarks. George H.W. Bush traveled outside of Washington to West Point for a departing address after failing to secure a second term, though he didn't actually bill it as a farewell.

The tradition extends back to George Washington, who issued warnings against unchecked power and partisan entrenchment in a written address to the nation in 1796.

Like major addresses in the past, Obama wrote his speech himself, dictating passages to his chief speechwriter Cody Keenan who puts the President's words into print. Obama returned the drafts with heavy annotations, writing his changes in a tightly compressed scrawl on the margins.

The President and Keenan went through at least four drafts of the farewell speech, an official told CNN Tuesday. The broad themes of the speech came together while the President was in Hawaii and he started reading a first draft on the long flight home last Sunday.

JUST WATCHED Obamas, Bidens take stage together Replay More Videos ... MUST WATCH Obamas, Bidens take stage together 00:49

Aside from Keenan, several familiar names from the past were involved in the drafting, including former speechwriter Jon Favreau and former senior adviser David Axelrod.

When he returns to Washington in the early morning hours of Wednesday, it will be Obama's 1,293rd -- and final -- flight aboard Air Force One. He'll use the presidential aircraft on Inauguration Day to depart Washington. But with only a former president aboard, it's known simply as a "Special Air Mission."