Crowds cheer King Charles during visit to Dunfermline
Large crowds gathered in Dunfermline to welcome King Charles and the Queen Consort on a visit to mark the former town's new status as a city.
The ceremony was their first public visit since the official period of royal mourning for the Queen ended.
King Charles said the event would "gladden my dear mother's heart".
The couple then visited Dunfermline Abbey before travelling to Edinburgh to host a reception celebrating the British South Asian community.
There were cheers from well-wishers when Charles and Camilla arrived at Dunfermline City Chambers on Monday morning.
After being met by First Minister Nicola Sturgeon, Scottish Secretary Alister Jack and Fife's Provost Jim Leishman, they walked across the cobbles to the waiting crowd.
King Charles spent more than five minutes reaching over the metal barriers to shake the hands of people who had queued to see the royal couple.
Linda Dalgarno, from Dunfermline, was one of the people who shook the King's hand.
She said: "It was amazing. It was so emotional to shake his hand.
"We weren't sure if he would come round and see everyone but he did and it was something to remember.
"It's history for the city."
The King then made a speech in the City Chambers, expressing his "delight" that Dunfermline had been one of the eight communities to be granted city status to mark the late Queen's Platinum Jubilee.
He said he and his wife were "immensely proud" to be able to share the historic moment.
"There could be no more fitting way to mark my beloved mother's extraordinary life of service than by granting this honour to a place made famous by its own long and distinguished history, and by the indispensable role it has played in the life of our country," he said.
"Now, of course, we gather to celebrate this great occasion but also to commemorate the life of Her late Majesty, whose deep love for Scotland was one of the foundations of her life."
After the ceremony the royal couple made the short walk to Dunfermline Abbey to formally mark its 950th anniversary.
They spent about 20 minutes in the abbey, then walked down the steps to St Catherine's Wynd and met members of the public. King Charles also met a group of schoolchildren.
The couple then travelled to Edinburgh to host a reception celebrating British South Asian communities.
Between 200 and 300 guests of British Indian, Pakistani, Bangladeshi, Sri Lankan, Nepalese, Bhutanese and Maldivian heritage from across the UK attended the event at the Palace of Holyroodhouse.
It recognised the contribution that people from these communities have made to UK life, from the National Health Service to the arts, media, education, business and the armed forces.
The late Queen Elizabeth previously visited Dunfermline Abbey to mark its 900th anniversary.
Lord Provost Jim Leishman, the former manager of Dunfermline Athletic football team, said it had been "a long, hard journey" to achieving city status.
"A lot of people deserve a lot of credit for the work they have put in over 10 years," he told BBC Radio's Good Morning Scotland programme.
"The King and Queen Consort are having a wee walk going down to the abbey after he has given us the city status - the people of Dunfermline will love that.
"That is what makes it very very special - his first official engagement in Scotland and he is coming to Dunfermline. That is a tremendous accolade for the people of Dunfermline."
All pictures are copyrighted.