President Obama acknowledges the crowd as he arrives to deliver his farewell address in Chicago. (Photo: John Gress/Reuters)

President Obama warned in his farewell address late Tuesday that only renewed citizen engagement can save American democracy from the threats of economic dislocation, racial resentment, and the toxic partisanship that fester inside insulated “bubbles” where everyone looks and thinks the same.

“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,” Obama told a crowd of approximately 18,000 in his adoptive hometown of Chicago.

“If you’re tired of arguing with strangers on the Internet, try talking with one of them in real life. If something needs fixing, then lace up your shoes and do some organizing. If you’re disappointed by your elected officials, grab a clipboard, get some signatures and run for office yourself. Show up. Dive in. Stay at it. Sometimes you’ll win. Sometimes you’ll lose,” the president said. “More often than not, your faith in America — and in Americans — will be confirmed.”

Obama spoke President-Elect Donald Trump’s name just once, and quickly quieted a chorus of boos that swelled from the audience in response. But sections of his speech could be seen as a message to the brash entrepreneur who is just 10 days away from taking the reins — most notably sections about accepting immigrants, beating back anti-Muslim prejudice and keeping American values safe from attack by autocrats and extremists.

The Islamic State “will try to kill innocent people, but they cannot defeat America unless we betray our Constitution and our principles in the fight,” Obama promised. “Rivals like Russia or China cannot match our influence around the world — unless we give up what we stand for, and turn ourselves into just another big country that bullies smaller neighbors.”

Obama’s remarks — part of a goodbye to the nation after eight tumultuous, consequential years — sometimes felt like a victory lap blended with a campaign rally. He came onstage to U2’s “City of Blinding Lights,” his 2008 anthem, and left to the strains of Bruce Springsteen’s “Land of Hope and Dreams,” a 2012 staple.

Story continues

“Yes we can! Yes we did!” he said.

First lady Michelle Obama and daughter Malia embrace as President Obama praises them during his farewell address. (Photo: Jonathan Ernst/Reuters)

Obama recited his well-worn list of accomplishments — the steady, though often unsatisfying, economic recovery from the depths of the Great Recession; the raid that killed Osama bin Laden; his outreach to Cuba; the deal to curb Iran’s nuclear program.

But his speech was perhaps more notable for his warnings. Those admonitions recalled past presidential farewells, whether George Washington telling Americans to beware partisanship at home and entangling alliances overseas, or Dwight Eisenhower deploring the influence of a “military-industrial complex” over government.

Obama warned of growing economic inequality and of the coming economic losses of middle-class jobs to automation. He implored Americans not to embrace divisions based on race.

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

To cure those ills, the president largely stuck to traditional Democratic calls for investments in education, a more generous safety net, stronger unions and higher taxes on the wealthy.

But his starkest warning was that Americans must stop sorting themselves into homogeneous enclaves.

“For too many of us, it’s become safer to retreat into our own bubbles, whether in our neighborhoods or on college campuses or places of worship or especially our social media feeds, surrounded by people who look like us and share the same political outlook and never challenge our assumptions,” Obama said. “Increasingly, we become so secure in our bubbles that we start accepting only information, whether true or not, that fits our opinions, instead of basing our opinions on the evidence that is out there.”

And this makes the “battle of ideas” at the core of American democracy into a battle over basic realities.

“Without some common baseline of facts; without a willingness to admit new information and concede that your opponent might be making a fair point, and that science and reason matter, we’ll keep talking past each other, and we’ll make common ground and compromise impossible,” he said.

While he leaves office quite popular — nearly 60 percent approve of the job he’s doing, according to recent polls — and quite young, at 55, Obama gave no hint in the speech of his post-presidency plans.

“It has been the honor 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.”