IT would, on reflection, have been nice to have welcomed him to Scotland while he was still the leader of the free world but, as far as Barack Obama is concerned, it is better late than never.

The former president of the United States will make his first visit to this country on May 26. He will attend a dinner in Edinburgh organised by the Hunter Foundation, the proceeds being given to children’s charities and the Obama Foundation. It is said, too, that he will answer questions from members of the audience.

Mr Obama has spoken in the past of his mostly Scottish-Irish grandparents and their predecessors, describing them as “farmers, teachers, ranch hands, pharmacists, oil rig workers. Hearty, small-town folks”. It is not a stretch to imagine Scots family-tree enthusiasts combing dusty records to see if they are, by chance, related to the 44th President.

It is also safe to assume that his visit will not occasion the degree of opposition that President Donald Trump’s mooted state visit to Britain aroused a few months ago. Mr Trump’s conduct and attitudes had alienated so many Britons that it has been thought prudent to postpone his trip, the hope apparently being that people would have forgotten about his policies by the time he actually sets foot on these shores. Stranger things have happened.

Mr Obama is an inspirational orator and was a humane sort of president, one who was capable of scrutinising both sides of an issue and of delivering considered judgments. He did not get it right every time and his administration’s use of drones in the Middle East has been criticised but his qualities have been missed since leaving the White House three months ago.

His Edinburgh engagement will be one of his first major addresses since he left office. It might be wishful thinking but some are probably already hoping that we might then see more of him in public life, bringing his intelligence and critical faculties to bear on the issues that matter, in an increasingly turbulent and divided world; a state of affairs that his successor has done precious little to assuage.