BARACK Obama will deliver his farewell speech tonight as he prepares to leave office.

The US president will take the stage in his home city of Chicago at 9pm local time, 10 days before his replacement Donald Trump takes the keys to the White House.

About 7,000 members of the public will attend the event after braving -7°C temperatures to get free tickets, some of which were on sale within hours for as much as $5,000 on eBay and Craigslist.

Voters waited from 4.30am for the chance to attend the address, with all passes gone within 30 minutes. Online sellers said they were offloading theirs because they were “struggling” college students or looking to finance a honeymoon.

The historic speech will mark the first time a president has returned to his home town to bid farewell to the nation, and it will also be the first speech of its kind to be broadcast live in 360-degree video. Tech firm VRScout is to stream the footage live on its social media accounts, and also aims to turn it into an immersive experience using the Samsung Gear virtual reality headset.

The company’s Ryan Bell said: “We look at it as similar to the first time a president was put on television or a president was put on the radio.”

Obama, who has served two presidential terms, will be joined on stage by vice president Joe Biden and wife Michelle Obama, who bid her own official farewell in a speech on Friday.

In remarks seen as a warning to Trump, who has faced criticism for his statements on race, religion, gender and disability, she said America’s “glorious diversity” was “not a threat to who we are, it makes us who we are”.

Stating that serving as the country’s First Lady had been the greatest honour of her life, she gave her final message to the country’s youth, saying: “I want our young people to know that they matter, that they belong. Lead by example with hope, never fear. And know that I will be with you, rooting for you and working to support you for the rest of my life.”

Obama’s farewell address, which will begin at 2am on Wednesday morning in the UK, follows a tradition begun by George Washington in 1796. In a statement last week, he said his words would be “a chance to say thank you for this amazing journey, to celebrate the ways you’ve changed this country for the better these past eight years, and to offer some thoughts on where we all go from here”.

Tanika Sykes, one of the lucky 7,000 who got tickets, said she was “grateful” at the chance to be there and wanted to hear words of hope as the government changes.

Sykes said: “I’m ready for the Obama hope speech to encourage us, to let us know that it’s okay. We’re going to survive, we always do. And it’s going to be a great America.”

Meanwhile, plans for Trump’s inauguration ceremony on January 20 continue. Official proceedings will begin at noon on Washington’s West Lawn, where Trump and vice-president-elect Mike Pence will take their oaths of office. The former reality star will then give his inaugural address.