MSPs sworn in for fifth session of Scottish parliament
MSPs have been sworn in for the fifth session of the Scottish Parliament.
All 129 members took either an oath or an affirmation in the well of the Holyrood chamber.
The leaders of Holyrood's five political parties were sworn in first, before the remaining MSPs proceeded in alphabetical order.
With all the MSPs are sworn in, a presiding officer and deputies will be elected, with five contenders currently in the running for the top job.
The SNP is preparing for a return to government, having won 63 seats in the Scottish Parliament elections, two short of an overall majority once the non-partisan presiding officer is elected.
Nicola Sturgeon underlined her party's "loyalty to the people of Scotland" and the "sovereignty of the people" before taking the affirmation.
The Scottish Conservatives meanwhile took up a new position in the chamber, having overtaken Labour to be the parliament's second-largest party, with 31 seats.
Outgoing Presiding Officer Tricia Marwick oversaw the oaths and affirmations in three 45-minute batches, with MSPs allowed to choose which of the two different statements they make.
The oath of allegiance has members "swear that I will be faithful and bear true allegiance to Her Majesty Queen Elizabeth," concluding with "so help me God".
Meanwhile the affirmation has members "solemnly, sincerely and truly declare and affirm that I will be faithful and bear true allegiance to Her Majesty Queen Elizabeth," omitting any religious reference.
Ms Sturgeon, Labour leader Kezia Dugdale and Green Patrick Harvie took the affirmation, while Lib Dem leader Willie Rennie and Tory leader Ruth Davidson chose the oath.
Mr Harvie underlined his party's support for an "elected head of state" before making his affirmation.
Other MSPs made their vows in Doric, Gaelic and Scots as well as English, and SNP members John Swinney, Fulton MacGregor and Humza Yousaf wore kilts.
Analysis by BBC Scotland political reporter Andrew Black
Following the drama of election night, Scotland's 129 MSPs - a mix of faces both familiar and new - gathered for the fifth session of the Scottish Parliament since devolution in 1999.
They swore in either by oath or affirmation, and all were required to pledge allegiance to the Queen - although some members also chose to recite their own, customised versions.
First Minister Nicola Sturgeon, as well as affirming, added that her loyalty also lay with the Scottish people, while Green co-leader Patrick Harvie expressed his support for an elected head of state.
Labour left-winger Neil Findlay said Scotland's people should be "citizens, not subjects".
And oaths weren't just taken in English. Some MSPs chose to swear in using Gaelic and Urdu, while others opted for Doric, a form of traditional Scots spoken in the north-east.
With all 129 members sworn in, they went on to elect one of their own - Ken Macintosh - as the Scottish Parliament's presiding officer, beating off four other contenders for the job.
Today's events at Holyrood were largely procedural. There was a sense of fun and excitement in the parliament's bustling garden lobby, where MSPs of all parties mixed.
I wonder how long that will last?