SNP leader Nicola Sturgeon has been officially sworn in as Scotland's First Minister, making her the fifth person to hold the top job.

Ms Sturgeon received the Royal Warrant - formal approval of her appointment - at the Court of Session in Edinburgh.

The formal proceeding, which took place before 15 senior judges, came less than 24 hours after MSPs at Holyrood elected the former deputy first minister as the new head of the Scottish Government.

She is due to take First Minister's Questions at the Scottish Parliament for the first time in her new role this afternoon.

Ms Sturgeon succeeds Alex Salmond, who announced he would step down after a majority of voters rejected independence in September's referendum.

The appointment sees the Glasgow Southside MSP make history by becoming Scotland's first female leader.

Ms Sturgeon declared it had been "a very special occasion" as she left the court shortly after the ceremony.

Her formal appointment as First Minister and Keeper of the Scottish Seal took around six minutes in Court One of the Parliament House building.

It took place before a "full bench" of 15 judges and was presided over by the Lord President of the Court of Session and head of the Scottish judiciary, Lord Gill.

Proceedings were watched by various figures from the worlds of politics and law, including Ms Sturgeon's husband Peter Murrell and Lord Advocate Frank Mulholland QC.

During the ceremony, the Lord President called for the royal warrant to be read to the court by the principal clerk.

Ms Sturgeon then bowed her head in agreement as she was asked to "solemnly, sincerely and truly declare and affirm that you will well and truly serve Her Majesty, Queen Elizabeth, in the office of First Minister of the Scottish Government".

Following the official proceedings, Lord Gill told her: "On behalf of the court, I have the honour to congratulate you on your appointment as First Minister of the Scottish Government.

"You are now holder of one of the great offices of state.

"That is a great honour that will bring many arduous responsibilities but I hope that, notwithstanding the burden, the office of First Minister will give you great pleasure and fulfilment and I wish you well."

Ms Sturgeon has vowed to lead a "bold, imaginative and adventurous" government which will build a "social democratic and socially just" nation.

And she said she hopes her election as First Minister "opens the gate to greater opportunity for all women".

Addressing the parliament yesterday, she stated: "My pledge today to every citizen of our country is simple but it is heartfelt.

"I will be First Minister for all of Scotland. Regardless of your politics or your point of view, my job is to serve you. And I promise that I will do so to the best of my ability.''

Putting gender equality at the heart of her speech, she went on: "I hope that my election as First Minister does indeed help to open the gate to greater opportunity for all women. There should be no limit to your ambition or what you can achieve.

"If you are good enough and if you work hard enough, the sky is the limit - and no glass ceiling should ever stop you from achieving your dreams."

Mr Salmond left Bute House, the official residence of the First Minister, on Tuesday.

He said in a farewell address to MSPs: ''Any parting is tinged with some sorrow, but in this case it is vastly outweighed by a sense of optimism and confidence.

''Confidence that we will have an outstanding new First Minister, confidence in the standing and the capability of this chamber and, most of all, confidence in the wisdom, talent and potential of the people of Scotland.''

Ms Sturgeon yesterday received a telephone call from the Prime Minister to congratulate her on the appointment.

The previous holders of the post of First Minister are Donald Dewar, Henry McLeish, Jack McConnell and Alex Salmond.