Labour lost five seats in Scotland as the party secured a historic third term at Westminster.
The Liberal Democrats had plenty to cheer about on the night
The Scottish National Party increased its number of seats to six with wins in the Western Isles and Dundee East.
But the Lib Dems - who picked up East Dunbartonshire and Inverness, Nairn, Badenoch and Strathspey - overtook the SNP's share of the vote.
Dumfriesshire, Clydesdale and Tweeddale was won by the Tories, but they lost shadow Scottish secretary Peter Duncan.
The party's sole Scottish MP in the last parliament was defeated by Labour in Dumfries and Galloway.
He said: "It is a personal disappointment, but we have shown that we can still win constituencies in the south of Scotland.
"In the longer term we have to build on that."
Deputy Scottish Tory leader Annabel Goldie said the victory for David Mundell in the neighbouring seat was a "marvellous result".
He will now resign as a member of the Scottish Parliament, with the Tories' Derek Brownlee taking his place as he was next on the party's list for the region.
Scottish Secretary Alistair Darling won Edinburgh South West with a comfortable majority of more than 7,000 and said he accepted that people wanted the government to do more for them.
He said: "It also shows that they want us as a government to listen and to learn from what people are saying and we need to do that."
Labour also retained its grip on Aberdeen South, while the SNP held Angus against a strong Tory challenge.
|59 of 59 seats declared
Party leader Alex Salmond - who was re-elected in Banff and Buchan - said Angus MacNeil's victory in the Western Isles was "a great breakthrough".
"This is the first time that the Scottish National Party have won a seat from Labour in a UK General Election for 31 years," he said.
But he admitted he was "very disappointed" that Annabelle Ewing could not take Ochil from Labour.
"This is a setback for us, but nonetheless, over the piece, over the evening, it'll be the SNP who have got most to celebrate in Scotland," he said.
Argyll and Bute was the last seat to declare just after midday on Friday, the SNP had a 17.7% share of the Scottish vote - down by 2.4% on 2001.
The Lib Dems saw their share rise by 6.3% to 22.6%.
Party leader Charles Kennedy, who was re-elected in Ross, Skye and Lochaber, said there was a "new politics" in Britain.
Angus MacNeil won the Western Isles for the SNP
"The era of three-party politics right across the UK is now with us and that is something that I welcome," he said.
"It is a healthy development, and I think that what we are seeing taking place in terms of the progress of the Liberal Democrats right across the land is something to be celebrated."
The party also has the youngest Scottish MP following 25-year-old Jo Swinson's victory in East Dunbartonshire.
Labour was expected to finish with 41 seats in Scotland while retaining power at Westminster with a reduced majority.
Chancellor Gordon Brown held his Kirkcaldy and Cowdenbeath seat with a majority of more than 18,000.
He said: "I promise that we will listen and we will learn so that we can serve our country and our communities even better in the years to come."
David Mundell is the sole Tory MP in Scotland
Commons Speaker Michael Martin was involved in an angry exchange following his election to the Glasgow North East seat after a heckler branded him a "Nazi sympathiser".
There were more angry scenes at the count in Glasgow after Labour's Mohammed Sarwar and the other Glasgow Central candidates refused to share the stage with the British National Party.
Chants of "fascists out" echoed round the hall after Scottish Socialist Party activists confronted BNP followers.
The police intervened to separate both sides and minutes later had to defuse a further confrontation between SSP MSP Rosie Kane and the BNP.
The SSP's share of the national vote fell from 3.1% to 1.9%. Convener Colin Fox said: "We expected a tough time, we got a tough time, we have thrown our hands up to it and said we knew it was coming."
The Greens secured 1.1% of the vote, and co-convener Robin Harper said: "I'm terribly pleased with our performance - it's better than we have ever done before."
More than 2.3 million people went to the polls in Scotland, giving a total turnout of 60.6% - up 2.7%.
South of the border former Glasgow Kelvin MP George Galloway, who was expelled by Labour last year, won the safe Labour seat of Bethnal Green and Bow.