FOR those who believe in omens it was the moment when the clouds slid over the sun. Two million had gathered before the western front of the US Capitol on a bitter but glistening January day to watch a young senator from Illinois be sworn in to the office of president of the United States. Tens of millions more were watching at home around the world.

Barack Hussein Obama was within seconds of officially becoming the first black president of America. He had seemed to rise from nowhere, running a successful campaign against the mighty Clinton machine, and now here was his big moment. The self-dubbed skinny kid with the funny name was about to become The Man. And he flubbed it.

Between talking over each other and getting the words in the wrong order, Mr Obama and Chief Justice John Roberts crashed the oath so badly they had to do it again in private the next day. As another president-elect prepares to solemnly swear, etc, this Friday, it is tempting to look back to Mr Obama’s first inauguration in 2008 and see it as a sign of things to come. The fairytale politician with a Hollywood backstory was revealed to be a mere mortal after all, and so the course for the rest of his presidency was set. Mr Obama would achieve extraordinary things, but his failures would match, and in some eyes eclipse, them.

Not that it would have seemed so to anyone who watched his farewell address last week in Chicago. Back on home ground, Mr Obama said America was a better, stronger place than when he had taken office. After a verbal waltz around American history and the constitution, with dips of gratitude towards his family, he closed with a new variation on an old move. “Yes we can,” he told the cheering audience, reprising the era-defining slogan on which he had campaigned, following this with, “Yes we did”.

Well, that depends on the subject. If one drew up two columns, the first titled “Yes he did”, the other “No you didn’t”, Mr Obama’s two terms in office offer plenty of entries. At the top of the first column, the undoubted achievements, was his steering of America out of the second Great Depression. Had it not been for the steps his administration took early on to boost America’s economy, the rest of the world would have suffered far more than it did. Allied to that achievement has been the number of jobs created on Mr Obama’s shift. In the month before he came into office, 800,000 Americans lost their jobs. Through a stimulus package and targeted help (towards the car industry in particular), the president played a large part in turning this around. Month after month the number in work has kept rising. By the end of 2016, America had enjoyed 75 consecutive months of jobs growth, with 156,000 new posts created that December alone.

Also in the “Yes we did” column is his deal with Iran to halt its nuclear weapons programme, the rapprochement with Cuba, ushering in same sex marriage, helping to negotiate the Paris climate change agreement, extending affordable healthcare to 20 million Americans - many of them poor and black - and finding Bin Laden. All impressive achievements, the passing of the Obamacare health reforms particularly so. Are they enough, though, to make up for what is in the second column, the “No you didn’t” list?

Here you will find Mr Obama’s failure to act on Syria, leaving the way clear for the Russians to preside over carnage and forcing millions to flee. Guantanamo remains open, despite a 2009 pledge to close it within a year. Gun violence, be it mass shootings by individuals or the killings of unarmed black civilians by the police, remains America’s shame. Racial divisions seem just as entrenched as they were when America’s first African American president took office. Gridlock with a hostile, Republican-dominated Congress cannot absolve the 44th US president of everything. Even his jobs miracle has a flipside. While median household income grew 5.2 per cent in the year to 2015, in real terms it is still less than it was in 2007. For American families this is far from a sprint back to prosperity.

There is one more thing that can be added to the debit column if one believes that a president can be judged by the country he hands on. The America that Donald Trump will swear to serve is a deeply polarised nation. Half the country, and many in the wider world, are fearful over what is to come. Mr Obama may be departing office with his popularity ratings at record highs, and while Hillary Clinton beat Mr Trump in the popular vote by almost three million, it remains the case that, asked to give their response to eight years of Obama, America answered “Trump”.

Accounting exercise over. It is ultimately the job of posterity to add and subtract from the Obama columns. He will have his say in the inevitable memoirs. Yes he did? No he didn’t? History may conclude crisply: “Well, he tried.”