Former US president Barack Obama has given a speech at a charity dinner in Edinburgh, addressing an audience made up largely of business leaders.
The event was organised by the Hunter Foundation, set up by the philanthropist Sir Tom Hunter.
Thousands of people gathered at the venue but were disappointed when Mr Obama avoided the front entrance.
The former president had visited St Andrews earlier, playing a round of golf on the Old Course.
Mr Obama had arrived in Edinburgh by private jet, on what was his first visit to Scotland.
A large crowd outside the charity dinner were told by police that Mr Obama would not be making a public arrival.
Stewart Kermack, 61, from Prestwick, said: “I came especially to see Obama. I think he is a great guy and was a very charismatic leader.”
Jody Mulvey, 20, from Edinburgh said: “I’m disappointed we didn’t get to see Obama but I understand after everything that’s going on right now.”
The dinner at the EICC is thought to be one of his first major addresses since his term as president came to an end.
Tickets for a table of 10 at the event are understood to have cost about £5,000.
First Minister Nicola Sturgeon was at the dinner.
Although the media were not allowed inside, Mr Obama is reported to have said that in times of inequality people turn to simplistic and populist answers on the left and the right.
He also spoke about the Manchester bombing, saying it is not possible to solve lone wolf attacks perfectly.
If someone is determined and willing to die, he said, it is almost impossible to prevent that entirely.
All of the cash raised at the dinner will be split between children’s charities in Scotland and the Obama Foundation.
Security was tight in Edinburgh as police stepped up resources around major events in the wake of the Manchester bombing.
Comedian Kevin Bridges, singer Annie Lennox and Scottish band Texas provided entertainment at the event and young people were also involved.
Thirteen-year-old Mila Stricevic, from Glasgow, read a poem after winning a schools competition.
Mr Obama, a golfing enthusiast, had been joined in St Andrews by Sir Tom Hunter, whose charitable foundation had invited Obama to speak in Edinburgh.
After completing the third hole, Mr Obama spoke to the crowd who had been following him around the course.
He shook hands with people and asked them how they were doing before heading back to play golf.
The Hunter Foundation has previously arranged for US politicians and actors including Bill Clinton, Leonardo DiCaprio and George Clooney to come to Scotland.
Last year, Leonardo DiCaprio travelled to Edinburgh to speak at the Scottish Business Awards at the EICC.
Announcing Barack Obama’s visit in April, Sir Tom said: “From the south side of Chicago to the White House has been an epic, historic journey and it will be a true honour to hear that story from the man who made that journey.
“We are both truly proud and delighted to be hosting the 44th president of the United States in Scotland at this event.”