Barack Obama believes Scotland has "a lot to offer the world'' and promised to return after his first visit to the country.
Labour Leadership Clash In Glasgow
Labour has gone backwards in Scotland under Jeremy Corbyn, leadership challenger Owen Smith has claimed as the two men clashed in the latest head-to-head debate of the campaign.
Mr Smith used the hustings event in Glasgow to blame Mr Corbyn for the party finishing third behind the SNP and Conservatives in May's Holyrood election.
He said: "We've gone from second to third. You're meant to be winning back Scotland on the basis that we'd be more radical and that would appeal to the Scottish people, you've just repeated it, and the reality is that in the last year when you've been leader of the Labour Party across the UK, we've gone from second to third behind the Tories.
"Under his leadership we have gone backwards in Scotland. This is not progress for Labour.
"We are at a lower ebb than we've been since 1982 and that should cause all of us in Scotland, Wales, England, right across the UK, to think 'when are we going to start winning'.''
Mr Corbyn responded by saying the SNP are "very good'' at pretending to "adopt the clothes'' of the Labour tradition in Scotland.
"The reality is something very, very different, of what they do in their economic strategy. And that surely is something that has to be challenged, is challenged in the Scottish Parliament,'' he said.
He added: "Yes, everybody is very clear there is a big fight ahead and a long road back but you've got to start on the basis that the health inequality in Scotland has to be challenged, the levels of poverty have to be challenged, insecure working conditions have to be challenged and what the SNP is doing is actually an austerity programme while they're pretending it's not an austerity programme.''
Both candidates have already pledged to invest £20 billion in Scotland if they are elected to lead a UK Labour government, and ruled out any kind of "progressive alliance'' with the Nationalists.
Mr Smith continued: "People in Scotland cannot look to Labour in Westminster right now and anticipate us winning a general election, and therefore we are ill-serving the Scottish Labour Party and we are ill-serving the people of Scotland.
"We need to get back to being a radical and credible government-in-waiting, and we need to be much more powerful in attacking the Tories.
"The people of Scotland want a real opposition and the NHS is being privatised, houses aren't being built, our schools system is being wrecked across England, and Scotland is being underfunded.''
Mr Corbyn also said Labour needed to challenge the SNP more on their "underfunding'' of Scottish local authorities.
Scottish Labour Party leader Kezia Dugdale, who is supporting Mr Smith's candidacy, did not attend the hustings.
Mr Corbyn earlier said he has confidence in Ms Dugdale's leadership, and that he would be happy to work with her in future if he remains in his job.
He said: ''She's elected leader of the Scottish Labour Party, I've been very happy to work with Kezia over the past year. I campaigned with her in her constituency and across Scotland, and will continue to do so.
''I'm disappointed that she's not supporting my re-election as leader. I hope to be re-elected leader and we will continue working together in the future.
''But I hope she realises that we're putting forward a clear anti-austerity programme. A year ago the Labour Party was not committed to an anti-austerity programme.''
Mr Smith said: "I think Kezia is doing a brilliant job. I think she is a fantastic role model for Labour across this country.''
However that was met with some jeers from the crowd and he added: "I am really worried that I am hearing a Labour audience laughing and jeering at the leader of Scottish Labour.
"I presume that you still support the leader of the Scottish Labour Party because I do, I think she's doing a great job.''
In an earlier speech in Glasgow, Mr Corbyn said a Scottish deficit of almost £15 billion places a huge question mark over the SNP's independence mission.
The Labour leader said the Government Expenditure and Revenue Scotland (GERS) statistics released on Wednesday showed independence would not be in the best interests of Scotland.
The figures revealed a Scottish deficit of £14.8 billion in 2015/16 when a geographic share of North Sea revenues was allocated.
Mr Corbyn said: ''The SNP have a different purpose which is to achieve independence. I respect their right to advance their cause but I also reserve the right to disagree with them and judge, just as a majority of people in Scotland did in 2014, that it would not be in the interests of the people of Scotland.
''Yesterday's GERS figures underline that concern. A Scottish deficit of £15 billion raises a huge question mark over the central economic mission of the SNP.
''A Labour government will demonstrate to the Scottish people that it is Labour which has the answers to the deep unfairness and inequalities that currently stain our country.''
Mr Corbyn accused the SNP of pursuing Conservative-style policies such as a benefits cap and low corporation tax, and of ''relentlessly'' attacking councils.
He said: ''It's Labour's commitment to making that difference that means that we're not looking for an alliance with the SNP.
''Let me make it clear. I will welcome support for all or any of our policies from any other political groups or parties, but I'm well aware that Labour and the SNP come from different traditions and have different goals.''
In a question-and-answer session after his speech, Mr Corbyn said he would not have backed independence in 2014 despite many left-wing voters seeing it as a means to break away from austerity.
He said: ''No I wouldn't. But I also think they've learnt a lesson that it hasn't ended austerity.
''We have had these big cuts in local government expenditure in Scotland and we do have austerity in Scotland, and a Government that relies on a higher oil price which is a thing of the past and not likely to return is obviously a great difficulty.''
Fans attending the Scottish Cup Final have been warned to expect delays before the match as security is increased following the attack in Manchester.
Torrential thundery downpours are set to descend on Britain over the bank holiday weekend, bringing an end to the spell of summery weather.
The family of Manchester bomb victim Eilidh MacLeod have said they are praying that her injured friend makes a full recovery.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred station:
Now playing: The best feel good music
Now playing: The best feel good music
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.