The Scottish council election counts, using banks of machines, took place during the day on Friday

The SNP and Labour have each claimed victory in the 2012 Scottish council elections, while the Liberal Democrat vote has collapsed.

The Nationalists claimed most seats across the 32 authorities, but a strong Labour performance saw the party winning in Edinburgh and Glasgow.

The most high-profile upset came when Edinburgh leader, Lib Dem Jenny Dawe, lost her seat.

The Tories also lost seats, but the Greens boosted their tally to 14.

Elsewhere, Labour won an overall majority in Glasgow, denying the SNP one of its top targets, to claim victory in the city.

The results came after people went to the polls on Thursday, to vote for more than 1,200 councillors.

The SNP won 424 seats across Scotland, while Labour came second with 394, on a day when both parties increase their number of seats.

The Conservatives ended on a total of 115, but the Liberal Democrats had the worst day out of the main parties, finishing on 71.

Comparing the figures [
as illustrated in the story table] to the situation at dissolution of Scotland's councils, the SNP was up by 57; Labour up by 58; the Tories down by 16 and the Lib Dems down by 80.

Comparing the figures directly with the results of the 2007 local council elections, the SNP was up by 61; Labour up by 46; the Tories down by 28 and the Lib Dems down by 95.

Key results included:

The SNP won their first majority councils, in Dundee and Angus.

Labour gained overall control of Renfrewshire Council, where SNP local government minister Derek Mackay used to be leader, as well as West Dunbartonshire and North Lanarkshire councils.

In Glasgow, where Labour was facing a strong SNP challenge, the party won an overall majority.

Labour also gained in Aberdeen, increasing its tally of councillors, by nine, to 17.

The Lib Dems were wiped out in Stirling and Clackmannanshire.

Most councils - 23 - were "hung", due to the PR voting system, including Edinburgh, with no one party in overall control.

"Five years after backing the SNP for the first time, Scotland continues to move forward with the only national party - that is a substantial achievement.

He added: "The Lib Dems and Tories have had a disastrous day, feeling the full force of the Scottish people who have rejected their damaging austerity agenda in favour of the SNP locally and nationally."

Seeking to put a positive spin on the result in Glasgow, Mr Salmond added: "Labour's campaign stalled in Glasgow, with not a single extra seat, while the SNP increased our number of councillors and pushed Labour to the wire in their heartland."

In what was her first electoral test since becoming Scottish Labour leader, Johann Lamont told the BBC: "Right across the United Kingdom, Labour has been supported to stand up for people in these very tough times.

"It's a fantastic result, we've now got a really important job to do, which is to make sure that government at every level governs in the interests of those who are the most vulnerable, and those who are worried about their jobs and their services. And that's a great day for us, more importantly it is about protecting people, fighting for their priorities too."

Willie Rennie, the Scottish Liberal Democrat leader, said sorry to party members who lost out in the elections.

He said: "These results should dispel any myth that the Liberal Democrats are only in the coalition for ourselves. We never were. It has always been about doing the right thing for the fortunes of the country.

"This is a very distressing day. We have lost many, many strong community activists who have stuck up for their area for many long years.

Scottish Tory leader Ruth Davidson achieved her aim of leapfrogging the Lib Dems into third place, despite the party's loses.

Ms Davidson, said: "We are up in Argyll and Bute, Aberdeen, Aberdeenshire and East Lothian, and we are now heading towards becoming the third party of local government in Scotland for the first time since 1992.

"We are the largest party in the Borders and South Ayrshire, and we will play a pivotal role in forming a number of administrations across Scotland."

She added: "Over the next two or three days, we will play a key part in deciding who controls local councils right across the country."

Green MSP Patrick Harvie said he was "very happy" with the result, adding: "To nearly double the number of councillors we have in Scotland - which is mirrored by our sister party south of the border - leaves lots of happy Green faces walking away from the count in Glasgow.

"It's very hard when everyone in the media are talking about Labour and the SNP, it's hard to make that breakthrough."

Health campaigner

Elsewhere, Michelle Stewart, who fronted the successful campaign for a public inquiry into a deadly outbreak of Clostridium difficile at Vale of Leven hospital, was elected as a Labour councillor in West Dunbartonshire, in the Leven ward.

Her mother-in-law Sarah McGinty died after contracting the infection at the hospital.

The Glasgow City Council results were all known by 16:00 on Friday

Deputy First Minister Nicola Sturgeon's mother, Joan, was re-elected as a councillor in Irvine East, North Ayrshire.

And Martin Ford, the former Lib Dem councillor who was chairman of the Aberdeenshire Council committee which controversially rejected Donald Trump's £1bn golf resort at Menie, was elected as a Green member in the authority's East Garioch ward.

One high-profile contender who failed to win a seat was Gail Sheridan, wife of disgraced former socialist MSP Tommy Sheridan, who failed to be returned in Glasgow for his Solidarity party.

There were concerns turnout for the ballot may have suffered, because the council elections were being held on their own for the first time since 1995.

They were separated from the Scottish Parliament poll to help avoid a repeat of the 2007 fiasco, in which about 100,000 ballots were spoiled and problems with the electronic counting delayed results.

The proportional representation system of single transferable vote (STV) was used in Thursday's ballot, meaning voters numbered candidates in order of preference.

People in Dunoon will not vote until next Thursday for their three councillors because the death of a candidate led to the election being postponed.