Ken Macintosh chosen as Holyrood presiding officer
Ken Macintosh has been elected as presiding officer for the fifth term of the Scottish Parliament.
The Labour MSP, who will renounce his party affiliation as part of the role, won out after three rounds of voting.
His former colleagues Johann Lamont and Elaine Smith were also in the running, along with Conservative members Murdo Fraser and John Scott.
SNP MSPs Christine Grahame and Linda Fabiani were elected to serve as deputy presiding officers.
All 129 MSPs were sworn in earlier in the day, and their first task was to elect the team which presides over debates and Holyrood business.
The roles, the presiding officer job in particular, include undertaking diplomatic functions and representing the parliament at home and abroad.
Analysis by Brian Taylor, BBC Scotland political editor
He has a tough job ahead but he made a notably fine start.
First, there was no hubris or bombast in his tone. Indeed, in acknowledging victory, he deployed some deft drollery, at his own expense.
He apologised in advance if he failed to recognise every one of the new MSPs - all 51 of them, albeit with four retreads.
In his zeal to acknowledge and welcome newly elected colleagues, he said that over the last couple of days he had warmly congratulated… two catering staff, one BBC journalist and a Special Branch officer.
The Presiding Officer then went on to set the theme for his term in charge. He would seek "to work together across the party divide for the common good."
This objective, decidedly well expressed, matched exactly his statements in the run-up to the contest. He offered consensus. He offered conciliation.
Perhaps it was this offer which attracted the degree of SNP support which, by arithmetical definition, the winner required.
However, the new PO will also require steel. To convene a Parliament where there are shifting power bases and no clear majority. To convene a Parliament which has much more power, including over tax.
A secret ballot was held in the Holyrood chamber, with repeated rounds of voting until a majority supported one candidate.
Ms Smith was eliminated after the first round, while her fellow former deputy presiding officer Mr Scott was knocked out in the second round.
Mr Macintosh secured a majority of votes in the next round, with 71 MSPs supporting him. Mr Fraser won 31 votes, and Ms Lamont 26.
The new presiding officer paid fulsome tribute to his predecessor Tricia Marwick, and said he was "very grateful indeed" for the "honour and privilege" of the role.
He said: "As Tricia and many of her former colleagues step down, it gives me great pleasure to welcome and thank you, the class of 2016.
"I can see around me many familiar faces and friends, but I see too a huge number of new members, freshly elected. And can I say on a personal level, the energy and the infectious enthusiasm and optimism which you have filled this building within just a few days has invigorated me and refreshed this place."
He also apologised for any mistakes in advance, revealing that he mistakenly welcomed catering staff, a BBC journalist and a policeman to Holyrood as new MSPs.
Mr Macintosh was nominated by fellow Labour MSPs Jackie Baillie and Mark Griffin, while colleague Johann Lamont was backed by Jenny Marra and Green MSP Andy Wightman.
Mr Fraser was nominated by Conservative colleagues Liz Smith and Miles Briggs, while John Scott also had backing from Tories Alex Johnstone and Peter Chapman.
Former deputy presiding officer Elaine Smith was backed by Labour colleague Rhoda Grant and SNP MSP Colin Beattie.
MSPs then had to choose two deputy presiding officers from a field of three SNP MSPs - Ken Gibson, Linda Fabiani and Christine Grahame - and one Conservative, Margaret Mitchell.
Ms Fabiani and Ms Grahame won out after two voting sessions.