He tried his hand at the home of golf where he charmed delighted spectators - before being introduced to Scotland’s other national drink, Irn Bru.
Amid tightened security in the wake of the Manchester attack Mr Obama made an unannounced visit to the Old Course in St Andrews. Delighted fans, many of them tee-ing off themselves, were stunned to see the smiling celebrity walk the Greens.
After flying into Edinburgh in a private jet yesterday morning, he was met by a cavalcade of cars and whisked up to the Fife course.
Crowds began gathering at the world famous grounds as word got out the legendary politician was in town. As he practised on the putting green he shouted to the crowd: “I understand the weather is always like this in Scotland. You are very lucky.”
Thrilled onlookers started cheering and clapping before Mr Obama took off his hat and acknowledged their applause with a flash of his trademark smile and raising his cap.
The former president’s caddy, who looked a little tense, reassured him there was “no pressure, sir” before he was seen teeing off the third.
Mr Obama, a keen golfer who played a round in Tuscany last week, said: “Well, going by those shots I shouldn’t feel any pressure.” And after his shot, he said: “Oh, that wasn’t so pretty.”
He then took time to wander over to the growing crowd who had been following him round the course.
He shook hands with people and asked them how they were doing before heading back to play golf. He was spotted doing sporty stretches before and during his game as security, dressed in casual clothes, encircled his team.
Half way round the course, in 26C degree heat, Scots tycoon Sir Tom Hunter - who had invited Mr Obama to Scotland to speak at a charity dinner on Friday night - took him to a snack bar for some refreshments. It was here the Democrat was introduced to a bottle of Irn Bru. Pictures emerged of him being handed a sugar-free bottle of the orange drink, but no-one could confirm if he tasted it.
St Andrews University student Danielle Clark Bryan, 26, was stunned to have met the former White House resident.
“I was the first person to shake his hand, he came over and said: ‘How’s everyone, let’s shake some hands’. I happened to be in his eye line and I asked how he was but he didn’t respond.
“You could hear him joking with his friends, it sounded like he’s having a really good time.”
He later spoke to with 11-year-old Joseph Lynch. The schoolboy said: “It was brilliant. He asked what was my name, how old I was and told me that I was a good looking guy.
“Apart from missing a shot a couple of minutes ago, he seems quite good at golf.”
Another student Marcus Tannerbaurer, 26, said: “We shook his hand he seemed really nice. He seems pretty good at golf, but I’m not one to judge.”
Philanthropist Sir Tom Hunter, who accompanied him round the course, praised Mr Obama’s golf skills.
He said: “He played great, I don’t play golf so I was simply doing the drinks and driving the buggy, but it was great fun.
“That was the very first time I’ve met him, he was very cool.
“There was a lot of interest in St Andrews, but he was pretty relaxed and spoke to everybody.
“Who wouldn’t enjoy Scotland on a day like this? It’s brilliant to have him here.”
And the philanthropist admitted meeting the 44th US President had been as much fun for him as the crowds.
“I’m not really someone who gets too excited - I’m on a pretty even keel - but today, yeah, this is an exciting one for sure,” he said.
“I first wanted to get president Obama here when I saw his inauguration in 2009. It was a rainy day in Scotland and I was just blown away by his speech and his message of hope, and I just thought it would be great to have him in Scotland.
“After he left office in January we made the invitation. Former US ambassador to Britain Matthew Barzun, who I’d become friendly with, was very helpful in making the right connections.”