The Kirking of the Parliament was held at St Giles' Cathedral in Edinburgh to mark the start of Holyrood's fifth session.
Nicola Sturgeon will now lead a minority government after her party won 63 of the 129 seats in last week's election.
Nicola Sturgeon will now lead a minority government after her party won 63 of the 129 seats in last week's election.
The assembly on Wednesday evening was attended by representatives from organisations across Scotland, the diplomatic corps and faith groups, as well as Prince Charles, Duke of Rothesay and the new MSPs.
The event comes before parliament opens on Thursday and new members are sworn in.
St Giles' minister Revd Calum MacLeod led the service which also included a reading by the Parliament's outgoing presiding officer Tricia Marwick, as well as interfaith blessings and a sermon by the Rt Revd Dr Angus Morrison, Moderator of the General Assembly of the Church of Scotland.
In his sermon, Revd Morrison congratulated those who have just been elected to such high office, but added that "I might want to remind the MSPs that the real boss is the people who elected them".
He spoke of the many challenges facing society including poverty, homelessness and loneliness and he called for cross-party cooperation on these matters.
He said: "I appeal to all of you whom the citizens of this country have elected to serve as members of the Scottish Parliament to remember there will be times when party loyalty can be set aside in exchange for working together harmoniously and constructively for the good of Scotland and it's people."