Nicola Sturgeon has led the SNP to a record third term in power at Holyrood, biut failed to secure a majority win.
A surge in support for the Scottish Conservatives saw them overtake Labour to become the main party of opposition.
READ MORE: Live: Scottish election 2016
In a dramatic night of results, Tory leader Ruth Davidson secured a shock victory in Edinburgh Central as her party won 31 MSPs - by far its best result ever at the Scottish Parliament and up from 15 in 2011.
Ms Sturgeon's party won 63 of the 129 seats that were up for grabs, failing to secure a second overall majority.
The SNP ended up with six fewer MSPs than the record 69 the party won under Alex Salmond in the 2011 landslide.
Labour endured another disappointing result, with the party securing 24 seats - a drop of 13 from the party's total five years.
David Cameron tweeted his congratulations to Ms Davidson on the Tories' "historic result".
He added: "She is a leader who will stand up to the SNP and give Scotland strong opposition."
Scottish Labour leader Kezia Dugdale said she was "heartbroken" the Conservatives had overtaken her party - which once dominated Scottish politics - to claim second place in the election.
Last May the party lost all but one of their MPs from Scotland as the SNP swept the board in the general election.
Ms Dugdale said after that result "this election was always going to be tough for the Scottish Labour Party".
She insisted she would remain as leader adding: "I am proud that our campaign rose to the challenge of offering an alternative vision of what could be done in our new, more powerful parliament."
With the constitution now the dominant issue in Scottish politics, she said her "determination to try to move the Scottish debate on" from the arguments of the 2014 independence referendum had cost Labour votes.
She backed income tax rises for not just the wealthiest Scots but basic rate taxpayers, saying this was needed to prevent cuts in public services such as schools and the NHS.
Ms Dugdale added: "There's no doubt that our defeat for the Labour Party is painful but it is not the end of our campaign.
"We will continue to argue for Labour values, Labour ideas and Labour principles.
"The work to renew the Scottish Labour Party so it is fit to serve the people of Scotland continues."
Throughout the election campaign, the polls had predicted the SNP would win another overall majority at Holyrood.
However, this failed to materialise, a result which could see the Tories put pressure on the nationalists to scrap their controversial named person scheme.
The Tories have consistently opposed the measure, which proposes appointing a guardian to monitor the welfare of every child in Scotland.
READ MORE: Jeremy Corbyn: 'Lot of building to do' in Scotland
The Conservative campaign had focused on providing a strong opposition to the SNP and Ms Davidson accepted "many people that have given us their vote for the very first time, not because they're true blue Conservatives, but because there's a job of work they want us to do".
She hailed her victory in Edinburgh Central as an ''incredible result'' and added: ''I hope the message that was resonating was of being a strong opposition, to hold the SNP to account, to saying no to a second independence referendum, to respect the decision that our country made, and to really focus on the things we're paying a government to focus on, on schools, on hospitals, on public services. That's what people want.''
Chancellor George Osborne tweeted his congratulations to Ms Davidson and activists for an "extraordinary result in Scotland".
The Tory added: "We've deprived @theSNP of a majority."
Scottish Secretary David Mundell - whose son Oliver captured the Dumfriesshire constituency from Labour - declared the result to be a "a seismic change in Scottish politics".
The Tories' previous best result at Holyrood was 18 MSPs, a total the party achieved in both 1999 and 2003.
Mr Mundell said: "I was a candidate back in those first elections in 1999, it would have been incredible to think the Scottish Conservatives could have finished ahead of Labour and be the official opposition. It demonstrates that Ruth has transformed our party in Scotland."
As well as winning in Dumfriesshire, the Tories also seized the Eastwood constituency from Labour, with Conservative deputy Jackson Carlaw taking the seat.
Early indications it could be a bad night for Ms Dugdale's Labour were apparent from the second seat to be declared.
READ MORE: Labour's deputy leader calls for members to be patient with leadership
The party lost the Rutherglen constituency which it had held since 1999 to the SNP and seats which had previously been considered part of Labour's heartlands also fell to the nationalists, including Motherwell and Wishaw, and Greenock and Inverclyde.
A year after losing all its Glasgow seats in the Westminster election, Labour suffered the same result at Holyrood, with the SNP winning all nine of the constituencies in the city.
Ms Dugdale failed to win the Edinburgh Eastern seat she had stood in and had to rely on the Lothian list vote to secure her place in the Scottish Parliament. Her deputy Alex Rowley lost the Cowdenbeath seat he won in a by-election, and was returned to Holyrood via the Mid Scotland and Fife list.
Veteran Labour MSP Jackie Baillie held on to the Dumbarton constituency she has represented since 1999 but with a majority of just 109 over the SNP.
Labour did enjoy a rare gain from the SNP in Edinburgh Southern, where Daniel Johnson won the seat for the party.
READ MORE: Live: Scottish election 2016
The Liberal Democrats secured some victories, with their leader Willie Rennie winning the North East Fife constituency while children's charity worker Alex Cole-Hamilton was elected as the new MSP for Edinburgh Western, taking the seat from the SNP.
The party failed to increase its tally of MSPs at Holyrood, remaining on five, while the Scottish Greens are now the fourth largest party.
They had their second best ever result, with six MSPs elected, all via the regional list system after Patrick Harvie came second to the SNP in Glasgow Kelvin.
He was again returned as a regional representative for the city, with the Greens also securing two MSPs from the Lothians, one from Mid Scotland and Fife, on from the Highlands and Islands region and one from the West of Scotland, where Ross Greer made history by becoming the youngest-ever MSP at the age of 21.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article