A special “farewell” ceremony has been held to mark the departure of the Stone of Destiny, the ancient sandstone block used in the coronation of monarchs, from Edinburgh Castle.

The artefact, also known as the Stone of Scone, is soon going to Perth Museum where it will be at the centre of a £27 million redevelopment.

On Thursday, First Minister Humza Yousaf attended the ceremony in his role as one of the Commissioners for the Safeguarding of the Regalia – who are responsible for the preservation of the stone.

He and the Lord Lyon Joseph Morrow, the head of state ceremony in Scotland, gathered with guests from around the country in the great hall of the castle on Thursday afternoon, where the sandstone block sat on a plinth.

Scottish Secretary Alister Jack and Major General Alastair Bruce, the governor of Edinburgh Castle, were also part of the event.

READ MORE: Alex Salmond's piece of Stone of Destiny 'found in cupboard at SNP HQ'

Before taking part in a procession to the castle esplanade, Mr Yousaf addressed the gathering, describing the history of the stone and its significance to Scotland.

He said: “This will be the first time that the stone will return to Perthshire in over 700 years.

“And it will form the magnificent centrepiece of the fantastic new Perth Museum – with the stone being free for all to visit.”

Ahead of the ceremony, the Lord Lyon said it would be a “farewell” for the stone – “marking something that’s significant”.

He told the PA news agency some aspects of Scottish history were best left “a wee bit mysterious”.

The Herald: Humza Yousaf, in his capacity as a Commissioner of the Regalia, attends a Beating Retreat ceremony on the Esplanade of Edinburgh Castle, to mark the transfer of the Stone of DestinyHumza Yousaf, in his capacity as a Commissioner of the Regalia, attends a Beating Retreat ceremony on the Esplanade of Edinburgh Castle, to mark the transfer of the Stone of Destiny (Image: PA)

Mr Morrow said: “We live in a world where theories are actually rife all over the place, and I just think we need to enjoy this symbol of our nationhood.

“What we do know is that the sandstone it’s made of is actually similar, in geological terms, to that around about Scone and Angus.”

He said the stone is a national symbol and doesn’t belong to any one city of Scotland, adding, “I’m from Dundee so I would support it going to Dundee, needless to say”.

Following the event in the great hall, the Lord Lyon, First Minister and others took part in a procession to the castle esplanade, where soldiers from Scottish battalions of the British Army provided music and piping in a beating the retreat ceremony.

In keeping with a custom introduced by the Lord Lyon, a “people’s procession” representing different parts of Scotland and organisations like charities and schools accompanied the royally-appointed officials.

READ MORE: Stone of Destiny returns to Scotland

The journey to Perth, near to where it was originally stored at Scone Abbey, is the latest chapter in the centuries-old story of the Stone.

Prior to its seizure by King Edward I of England as war loot in 1296, Scottish Kings and Queens were inaugurated while sitting upon it.

The 152 kilo slab of pinkish sandstone has a plain, battered look but carries enormous symbolism and historic significance.

It was incorporated into the English monarchy’s coronation chair and remained in Westminster Abbey almost entirely undisturbed until the modern era.

The artefact continued in its role after the Scottish and English crowns were united in the early 17th century.

In 1950, a group of students carried out an audacious raid to steal the stone from Westminster Abbey and return it to Scotland in order to advance the cause of independence.

It was later found on the site of the High Altar at Arbroath Abbey and it was used in Queen Elizabeth’s coronation three years later.

When the stone was formally returned to Scotland in 1996 to go on display at Edinburgh Castle, crowds lined the streets as it made its way up the Royal Mile.

Last year, the Stone of Destiny once again returned to London to carry out its traditional role in the coronation of King Charles, before coming back to Edinburgh Castle.

In recent months it has emerged that a fragment of the stone may be in a cupboard at the SNP’s headquarters, after Alex Salmond was given a chip by the late Sir Neil MacCormick – the son of one of the students whose raid in 1950 led to the block splitting in two.

However, work will be carried out to ascertain the authenticity of this fragment, amid calls for it to be reunited with the rest of the stone when it goes on display in Perth.

A spokeswoman for Historic Environment Scotland (HES) said: “HES act on behalf of the Commissioners of the Regalia in relation to the Stone of Destiny, and we are currently providing specialist technical advice in this matter.”