U.S. President Barack Obama walks with first lady Michelle Obama and daughter Malia on the South Lawn toward Marine One, preparing to depart the White House on Tuesday, Jan. 10, 2017 in Washington D.C. The President is traveling to Chicago to deliver his farewell address to the American people. (Olivier Douliery/Abaca Press/TNS)

WASHINGTON, DC - JANUARY 10: U.S. President Barack Obama salutes a U.S. Marine as he boards Marine One while departing from the White House, on January 10, 2017 in Washington, DC. President Obama is traveling to Chicago where he will deliver his farewell speech. (Photo by Mark Wilson/Getty Images)

Malia Obama, right, walks across the tarmac ahead of her mother first Michelle Obama to board Air Force One at Andrews Air Force Base, Md., Tuesday, Jan. 10, 2017. President Barack Obama is traveling to Chicago to deliver a farewell address, continuing a tradition established by the nation's first president more than two centuries ago. (AP Photo/Pablo Martinez Monsivais)

President Barack Obama has his picture taken with Air Force One crew members before his departure from Andrews Air Force Base, Md., Tuesday, Jan. 10, 2017. Obama is traveling to Chicago to give his presidential farewell address, continuing a tradition established by the nation's first president more than two centuries ago. ( AP Photo/Jose Luis Magana)

President Barack Obama, right, greets members of Air Force One crew before boarding the plane with first lady Michelle Obama, left, at Andrews Air Force Base, Md., Tuesday, Jan. 10, 2017. Obama is traveling to Chicago to deliver a farewell address, continuing a tradition established by the nation's first president more than two centuries ago. (AP Photo/Pablo Martinez Monsivais)

President Barack Obama and first lady Michelle Obama climb the stairs of Air Force One before departure from Andrews Air Force Base, Md., Tuesday, Jan. 10, 2017. Obama is traveling to Chicago to give his presidential farewell address, continuing a tradition established by the nation's first president more than two centuries ago. (AP Photo/Jose Luis Magana)

President Barack Obama and first lady Michelle Obama wave from Air Force One at Andrews Air Force Base, Md., Tuesday, Jan. 10, 2017. Obama is traveling to Chicago to give his presidential farewell address, continuing a tradition established by the nation's first president more than two centuries ago. ( AP Photo/Jose Luis Magana)

People look out of a second floor window at motorcade transporting President Barack Obama during his visits to Valois Restaurant in Hyde Park neighborhood of Chicago, Tuesday, Jan. 10, 2017. (AP Photo/Pablo Martinez Monsivais)

CHICAGO, IL - JANUARY 07: People wait in line, most for two or more hours, in sub-zero wind chill temperatures outside McCormick Place to get tickets for President Barack Obama's speech on January 7, 2017 in Chicago, Illinois. Obama is scheduled to deliver a farewell speech to the nation in Chicago on Tuesday evening. (Photo by Scott Olson/Getty Images)

CHICAGO, IL - JANUARY 07: People display tickets at McCormick Place for President Barack Obama's speech on January 7, 2017 in Chicago, Illinois. Obama is scheduled to deliver a farewell speech to the nation in Chicago on Tuesday evening. (Photo by Scott Olson/Getty Images)

CHICAGO, IL - JANUARY 10: Supporters file into the McCormick Center to see U.S. President Barack Obama give his farewell speech on January 10, 2017 in Chicago, Illinois. Obama will address the nation in what is expected to be his last trip outside of Washington as president. (Photo by Darren Hauck/Getty Images)

President Barack Obama and First Lady Michelle Obama walk off Air Force One after arriving at O'Hare International Airport Tuesday, Jan. 10, 2017, in Chicago. (AP Photo/Paul Beaty)

A woman holds a photo of President Barack Obama before he gives his farewell address in Chicago, Illinois on January 10, 2017.
Barack Obama closes the book on his presidency, with a farewell speech in Chicago that will try to lift supporters shaken by Donald Trump's shock election. / AFP / Joshua LOTT (Photo credit should read JOSHUA LOTT/AFP/Getty Images)

US President Barack Obama speaks during his farewell address in Chicago, Illinois on January 10, 2017.
Barack Obama closes the book on his presidency, with a farewell speech in Chicago that will try to lift supporters shaken by Donald Trump's shock election. / AFP / Joshua LOTT (Photo credit should read JOSHUA LOTT/AFP/Getty Images)

President Barack Obama wipes his tears as he speaks about the First Lady at McCormick Place in Chicago, Tuesday, Jan. 10, 2017, giving his presidential farewell address. (AP Photo/Charles Rex Arbogast)

US first lady Michelle Obama (R) and the Vice Presidents wife, Jill Biden, hug as US President Barack Obama speaks during his farewell address in Chicago, Illinois on January 10, 2017.( NICHOLAS KAMM/AFP/Getty Images)

President Barack Obama is joined by his daughter Malia and First Lady Michelle Obama after giving his presidential farewell address at McCormick Place in Chicago, Tuesday, Jan. 10, 2017. (AP Photo/Charles Rex Arbogast)

President Barack Obama on stage with first lady Michelle Obama, daughter Malia, Vice President Joe Biden and his wife Jill Biden after his farewell address at McCormick Place in Chicago, Tuesday, Jan. 10, 2017. (AP Photo/Pablo Martinez Monsivais)

President Barack Obama waves as he is joined by First Lady Michelle Obama after giving his presidential farewell address at McCormick Place in Chicago, Tuesday, Jan. 10, 2017. (AP Photo/Charles Rex Arbogast)

President Barack Obama is embraced by a woman in the crowd as he greets supporters after his farewell address at McCormick Place in Chicago, Tuesday, Jan. 10, 2017. (AP Photo/Pablo Martinez Monsivais)

CHICAGO — President Barack Obama bid farewell to the nation Tuesday in an emotional speech that sought to comfort a country on edge over rapid economic changes, persistent security threats and the election of Donald Trump.

Forceful at times and tearful at others, Obama’s valedictory speech in his hometown of Chicago was a public meditation on the many trials the U.S. faces as Obama takes his exit. For the challenges that are new, Obama offered his vision for how to surmount them, and for the persistent problems he was unable to overcome, he offered optimism that others, eventually, will.

“Yes, our progress has been uneven,” Obama told a crowd of some 18,000. “The work of democracy has always been hard, contentious and sometimes bloody. For every two steps forward, it often feels we take one step back.”

Yet Obama argued his faith in America had only been strengthened by what he’s witnessed the past eight years, and he declared: “The future should be ours.”

Brushing away tears with a handkerchief, Obama paid tribute to the sacrifices made by his wife — and by his daughters, who were young girls when they entered the big white home on Pennsylvania Avenue and leave as young women. He praised first lady Michelle Obama for taking on her role “with grace and grit and style and good humor” and for making the White House “a place that belongs to everybody.”

Soon Obama and his family will exit the national stage, to be replaced by Trump, a man Obama had stridently argued poses a dire threat to the nation’s future. His near-apocalyptic warnings throughout the campaign have cast a continuing shadow over his post-election efforts to reassure Americans anxious about the future.

Indeed, much of what Obama accomplished during his two terms — from health care overhaul and environmental regulations to his nuclear deal with Iran — could potentially be upended by Trump. So even as Obama seeks to define what his presidency meant for America, his legacy remains in question.

Even as Obama said farewell — in a televised speech of just under an hour — the anxiety felt by many Americans about the future was palpable, and not only in the Chicago convention center where he stood in front of a giant presidential seal. The political world was reeling from new revelations about an unsubstantiated report that Russia had compromising personal and financial information about Trump.

Obama made only passing reference to the next president. When he noted he would soon be replaced by the Republican, his crowd began to boo.

“No, no, no, no, no,” Obama said. One of the nation’s great strengths, he said, “is the peaceful transfer of power from one president to the next.”

Earlier, as the crowd of thousands chanted, “Four more years,” he simply smiled and said, “I can’t do that.”

Still, Obama offered what seemed like a point-by-point rebuttal of Trump’s vision for America.

He pushed back on the isolationist sentiments inherent in Trump’s trade policies. He decried discrimination against Muslim Americans and lamented politicians who question climate change. And he warned about the pernicious threat to U.S. democracy posed by purposely deceptive fake “news” and a growing tendency of Americans to listen only to information that confirms what they already believe.

Get out of your “bubbles,” said the politician who rose to a prominence with a message of unity, challenging divisions of red states and blue states. Obama also revived a call to activism that marked his first presidential campaign, telling Americans to stay engaged in politics.

“If you’re tired of arguing with strangers on the internet,” Obama said pointedly, “try to talk with one in real life. ”

With Democrats still straining to make sense of their devastating election losses, Obama tried to offer a path forward. He called for empathy for the struggles of all Americans — from minorities, refugees and transgender people to middle-aged white men whose sense of economic security has been upended in recent years.

Paying tribute to his place as America’s first black president, Obama acknowledged there were hopes after his 2008 election for a post-racial America.

“Such a vision, however well-intended, was never realistic,” Obama said, though he insisted race relations are better now than a few decades ago.

The former community organizer closed out his speech by reviving his campaign chant, “Yes we can.” To that, he added for the first time, “Yes we did.”

He staunchly defended the power of activists to make a difference — the driving factor behind Obama’s optimism in the face of so much anxiety, he said. Though the coalition of young Americans and minorities who twice got Obama elected wasn’t enough to elect Democrat Hillary Clinton to replace him, Obama suggested their day was still ahead.

“You’ll soon outnumber any of us, and I believe as a result that the future is in good hands,” he said.

Steeped in nostalgia, Obama’s return to Chicago was less a triumphant homecoming than a bittersweet reunion bringing together loyalists and staffers, many of whom have long since left Obama’s service, moved on to new careers and started families. They came from across the country — some on Air Force One, others on their own — to be present for the last major moment of Obama’s presidency.

Unexpectedly absent was Obama’s younger daughter, Sasha, who had been expected to join sister Malia at the speech. The White House said Sasha stayed in Washington due to a school exam Wednesday morning.

After returning to Washington, he will have less than two weeks before he accompanies Trump in the presidential limousine to the Capitol for the new president’s swearing-in. After nearly a decade in the spotlight, Obama will become a private citizen, an elder statesman at 55. He plans to take some time off, write a book — and immerse himself in a Democratic redistricting campaign.

As you comment, please be respectful of other commenters and other viewpoints. Our goal with article comments is to provide a space for civil, informative and constructive conversations. We reserve the right to remove any comment we deem to be defamatory, rude, insulting to others, hateful, off-topic or reckless to the community. See our full terms of use here.

More in National & World

WASHINGTON — A top House Republican has demanded details on the use of private emails by some of President Donald Trump’s closest advisers. Rep. Trey Gowdy, a South Carolina conservative who chairs the House Oversight and Government Reform Committee, and the top Democrat on that panel, Rep. Elijah Cummings, cite a recent Politico report that Jared Kushner set up a...

WASHINGTON — Republicans’ latest bid to roll back the Affordable Care Act appeared to collapse Monday as a third GOP senator came out against the measure and the Congressional Budget Office predicted major coverage losses should it become law.

UNITED NATIONS — North Korea’s top diplomat said Monday that President Donald Trump’s tweet that leader Kim Jong Un “won’t be around much longer” was a declaration of war against his country by the United States. Foreign Minister Ri Yong Ho told reporters that what he called Trump’s “declaration of war” gives North Korea “every right” under the U.N. Charter...

EAST STROUDSBURG, Pa. — A Pennsylvania funeral director has been charged with abusing corpses for allegedly taking cellphone pictures of the dead to “gross out” her friends and family. Twenty-seven-year-old Angeliegha Stewart also faces a marijuana charge, after Monroe County detectives found conversations about deals when they searched her phone last month amid their investigation into the photos. Authorities say...

WASHINGTON — U.S. Sen. John McCain says doctors have given him a “very poor prognosis” as he battles brain cancer. McCain underwent surgery in July for a brain tumor that was later found to be a form of glioblastoma, the same type of cancer that took the life of his former Senate colleague Edward M. Kennedy in 2009. McCain tells...