As Barack Obama's Presidency of the United States of America enters its final weeks, there are tens of millions of people in America and across the world who already feel a great sense of loss.

That sense will be heightened even more on January 20 when he walks out the doors of the White House for the last time as President. For this man brought an extraordinary dignity to the office; a dignity that never sagged, not even when a Republican Congressman, Joe Wilson, shouted out, "You lie", in the midst of his State of the Union speech in 2009. It was an unprecedented and rude outburst, never directed at any President before.

The world saw that Obama dignity again and again, most recently when he hosted President-elect Donald Trump in the Oval Office to fulfil his duty of ensuring that the transition of power is smooth. It could not have been easy. After all, Trump launched his political ambition on the allegation that Obama was not a born American and, therefore, occupied the office of President illegally. Trump maintained that position, even though he knew it to be false, until mere days before the November 8 elections, and even then without a word of apology. Yet, Obama received him with all the courtesy, respect and importance that was necessary for a President to engage his successor.

At the joint televised media event after their meeting, and in every statement Obama has made within the United States and in other countries, he has given every supportive chance to a Trump Presidency. He calmed the stock markets; he soothed worried leaders in Europe and in Latin America; and he tried to reassure millions of Americans who fear that their country may have made a backward step into authoritarianism at home and unilateralism abroad.

Beyond the dignity with which he conducted the office of the Presidency, he put a caring and concerned human face on it. Witness his readiness to engage in town hall meetings in the United States and in foreign countries; his willingness to open himself to questioning about his policies; and his tolerance of every person as his equal with a right to question and to be given answers.

The latter quality was displayed many times, but at none more effectively than in the heat of Trump-Clinton campaign trail when an older man, holding up a Trump sign, sought to interrupt Obama's speech as he stumped for Clinton. The crowd jeered the man. Obama stopped them in a fashion that is typical of him. He pointed out that Americans lived in a country of free speech; that the man looked like he served in the military (he was wearing a uniform with medals) and his service should be respected; that he was elderly and respect for elders is paramount. That encounter was later related by Trump (probably on the basis of false information that was not checked) as "a disgrace" because Obama "screamed at the protestor".

Obama also hands to the Trump Presidency a country in much better shape than he found it. An economy that was in the doldrums when he took office in 2008 is much improved; unemployment is down; the violent crime rate is the lowest since the 1970s; America was kept safe from foreign attacks throughout his Presidency; and, abroad, initiatives were taken, such as signing up to the agreements on Climate Change, and establishing diplomatic relations with Cuba that gave the US a more benevolent face than it had for decades.

Despite his intelligence, his charisma, and his eloquence, the deck was always stacked against him getting through a sweeping legislative programme that would deliver the transformation he promised. He was elected twice as President of the United States because he was able to reach over the vitriol of his opponents into the hearts and minds of ordinary people who trusted him, and who believed he would be the change they wanted to see in America. Those people were not only blacks and Hispanics; they crossed the wide spectrum American white voters – women, students, professionals and, significantly, the same people in Florida, Iowa, Michigan, North Carolina and Wisconsin that voted for Trump in this election.

Obama failed to do many things, including with respect to the Caribbean; for example, Guantanamo Bay in Cuba is still occupied by America as a military detention centre even though he pledged to end it. His foreign policy judgements require separate consideration, and will not all be regarded sympathetically. But, he gave America a face of decency around the world; and he gave people everywhere reason to be proud and cause to believe that dignity, equality and opportunity can be achieved. That in itself is a marvellous legacy.

Obama is probably no Saint, and he has never claimed to be. Politicians live in a rough and tumble world where tough decisions have to be made. But, he is unquestionably a man with a great sense of decency and a desire to do the right thing.

When he and his wife, Michelle, depart the White House, they will leave with their heads high – and, with grace and in dignity. They would have served their nation well, striving to heal its ethnic and racial divisions; working for tolerance of those seen as 'others' – the gay and lesbian community; and trying to establish that 'immigrant' is not a word to define the unworthy and the unwholesome, but a word to describe people who have always gone to America because they truly believed that it is a land of freedom and possibilities where hard work pays dividends and where it is possible to make something of themselves that is better than what they left behind. The Obamas did not succeed fully; but success cannot be measured in perfection – they have given America a glimpse of all that it can be; and in doing so much good has been established and will be difficult to destroy.

Responses and previous commentaries: www.sirronaldsanders.com

(Ronald Sanders is Antigua and Barbuda's Ambassador to the United States and the Organisation of American States. The views expressed are his own)