Scottish election sees SNP romp home to third term in power
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.
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.
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.
The Prime Minister has phoned Nicola Sturgeon to congratulate her.
David Cameron spoke to the SNP leader on Friday morning and it was agreed the two governments would work together "constructively" - with a focus on the steel industry, a Number 10 spokesman said.
Mr Cameron had earlier congratulated Ruth Davidson, leader of the Scottish Conservatives, on the "historic result", saying she would "stand up to the SNP and give Scotland strong opposition".
A Downing Street spokesman said: "The Prime Minister congratulated Ms Sturgeon on her party having the largest representation in the Scottish Parliament and, in return, Ms Sturgeon congratulated the Prime Minister on the gains made in Scotland by his party.
"The Prime Minister and Ms Sturgeon agreed that the UK and Scottish governments must continue to work together constructively, most crucially in the short-term on the future of the steel industry.
"It was noted that the two governments sharing information and experience could be of benefit to the steel industry across the UK and they agreed to keep in touch on this issue."
Scottish Secretary David Mundell, who is the only Conservative MP in Scotland, echoed Mr Cameron's comments.
He said: "I congratulate Nicola Sturgeon on her success in the election and I look forward to working with her over the next four years.
"With the Smith Commission delivered in full, and the Scottish Parliament set to get a raft of significant new powers, we have a real opportunity for our two governments to work together for the benefit of the people of Scotland."
Among the party's major gains was Ms Davidson winning the Edinburgh Central constituency from the SNP and deputy leader Jackson Carlaw taking the Eastwood constituency on the outskirts of Glasgow from Labour's Ken Macintosh.
Two Tory MSPs were elected in Glasgow, where academic Adam Tomkins and food retail manager Annie Wells picked up seats.
The SNP's Dennis Robertson lost his Aberdeenshire West seat to the Conservatives while Oliver Mundell - son of the Scottish Secretary - captured the Dumfriesshire constituency from Labour.
The Tories' previous best result at Holyrood was 18 MSPs, a total the party achieved in both 1999 and 2003.
Belfast Telegraph Digital