WASHINGTON — President Obama called for America to forge "a new social compact" in a celebratory farewell address in Chicago Tuesday night, saying political, economic and racial divisions will only increase "without a basic sense of solidarity "

"If we don’t create opportunity for all people, the disaffection and division that has stalled our progress will only sharpen in years to come," he said told thousands of rowdy supporters in a Chicago convention hall.

Obama's farewell covered the gamut of administration accomplishments, from the auto bailout to the Affordable Care Act to the killing of Osama bin Laden.

But like George Washington, whose farewell address Obama quoted from, Obama warned against internal divisions.

"After my election, there was talk of a post-racial America. Such a vision, however well-intended, was never realistic," he said. "For race remains a potent and often divisive force in our society. I’ve lived long enough to know that race relations are better than they were ten, or twenty, or thirty years ago – you can see it not just in statistics, but in the attitudes of young Americans across the political spectrum."

Those racial disparities are also reflected in economic inequalities, Obama said. "If every economic issue is framed as a struggle between a hardworking white middle class and undeserving minorities, then workers of all shades will be left fighting for scraps while the wealthy withdraw further into their private enclaves," he said.

He exhorted Americans not to "retreat into our own bubbles," of neighborhoods or churches or even social media feeds. "Increasingly, we become so secure in our bubbles that we accept only information, whether true or not, that fits our opinions, instead of basing our opinions on the evidence that’s out there," he said. He said the "selective sorting of the facts" was self-defeating. "Because as my mother used to tell me, reality has a way of catching up with you."

Obama consciously chose Chicago as the venue for the speech, departing from a modern tradition that has mostly used the Oval Office as the set for a televised address.

"I first came to Chicago when I was in my early twenties, still trying to figure out who I was; still searching for a purpose to my life," he said. "It was in neighborhoods not far from here where I began working with church groups in the shadows of closed steel mills. It was on these streets where I witnessed the power of faith, and the quiet dignity of working people in the face of struggle and loss. This is where I learned that change only happens when ordinary people get involved, get engaged, and come together to demand it.

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

Early on, the speech was interrupted by cheers and shouting. "Four more years!"

"I can't do that," Obama said.

"In ten days, the world will witness a hallmark of our democracy: the peaceful transfer of power from one freely-elected president to the next," he said, to a smattering of boos.

Obama also borrowed heavily from Thomas Jefferson, whose Declaration of Independence has inspired many of Obama's major speeches.

The American experiment was founded on "the conviction that we are all created equal, endowed by our Creator with certain unalienable rights, among them life, liberty, and the pursuit of happiness,” Obama said. “It’s the insistence that these rights, while self-evident, have never been self-executing; that we, the people, through the instrument of our democracy, can form a more perfect union.”

“This is the great gift our founders gave us. The freedom to chase our individual dreams through our sweat, toil, and imagination — and the imperative to strive together as well, to achieve a greater good.”

On the way to Chicago. White House press secretary Josh Earnest told reporters on Air Force One that Obama is “not one to be overly sentimental,” but it would be unrealistic for anyone in his position tonight not to feel some nostalgia. Indeed, the speech often hearkened back to the campaign rhetoric of 2008, ending in the chant of "Yes we can!"

The speech did not address Obama's post-presidential plans. "There will be a time and place” for Obama to speak at length about that, Earnest said. But Obama promised to remain engaged in the causes of his presidency.

"I won’t stop; in fact, I will be right there with you, as a citizen, for all my days that remain. For now, whether you’re young or 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.

"I am asking you to believe. Not in my ability to bring about change – but in yours.

"I am asking you to hold fast to that faith written into our founding documents; that idea whispered by slaves and abolitionists; that spirit sung by immigrants and homesteaders and those who marched for justice; that creed reaffirmed by those who planted flags from foreign battlefields to the surface of the moon; a creed at the core of every American whose story is not yet written.