President Barack Obama has bid farewell to the nation 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," he 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". Michelle Obama and her daughter Malia embrace as Obama praises them (AP) 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." Obama greets people in the audience after his