Image caption SNP leader Alex Salmond said he wanted to make Scotland proud

The Scottish National Party are preparing for a second term in government in Edinburgh, but this time with an overall majority.

SNP leader Alex Salmond said his party's majority win at Holyrood was "a victory for a society and a nation".

The party is expected to hold a referendum on Scottish independence towards the end of its term.

With all results in, the SNP had 69 seats, Labour 37, the Tories 15, the Lib Dems five, and others three.

During an address in Edinburgh, Mr Salmond said: "I'll govern for all of the ambitions for Scotland and all the people who imagine that we can live in a better land.

"This party, the Scottish party, the national party, carries your hope. We shall carry it carefully and make the nation proud."

The new intake of MSPs will meet for the first time in the Scottish Parliament on Wednesday.

SNP Finance Minister John Swinney said the party would "assert the Scottish position" in Westminster "in a courteous and effective way" but David Cameron "must understand that we go into those discussions with a much stronger mandate than we have done in the past".

"That's why the UK government must pay attention to what the Scottish government is saying," he said.

The SNP took key seats in Labour heartlands and the Liberal Democrat vote also collapsed.

The SNP now has a clear majority of four in the 129-seat Scottish Parliament, enough votes to hold an independence referendum.

The Greens returned two MSPs to Holyrood and independent Margo Macdonald was also back.

Labour leader Iain Gray announced he would stand down from the job in the autumn.

Mr Salmond, whose party formed a minority government after the 2007 elections, described the unfolding Holyrood election results as "historic".

Prime Minister David Cameron also offered his congratulations to the SNP leader for an "emphatic win".

Among its successes, the SNP won all 10 first-past-the-post seats in the North East and still managed to pick up an additional regional list seat after amassing more than 140,000 votes.

Labour big hitters, including finance spokesman Andy Kerr and former minister Tom McCabe, lost to the SNP in the party's West of Scotland heartland, while, in Glasgow, the SNP won the Anniesland seat with a majority of just seven votes.

Mr Gray said he had spoken to Mr Salmond early on Friday to congratulate him on his victory.

He continued: "Labour has lost many talented representatives, and it seems very likely that Labour's new and returning MSPs will play their part in the democratic process in the Scottish Parliament from opposition, but will do so with gusto.

"Labour's MSPs will work constructively with the new Scottish government to create jobs and tackle unemployment wherever we can."

Professor John Curtice of Strathclyde University indicated that Labour appeared to have had its poorest performance in Scotland for at least 80 years.

He added it was fairly clear that the party's campaign had "badly misfired" and "badly missed its target".

Alex Salmond's priorities Reinforcing the powers of the Scotland Bill to give economic teeth to that legislation

To identify borrowing powers to keep the revival in the constuction industry of Scotland moving

To identify the need to devolve corporation tax powers More on Salmond's victory speech

Mr Gray was only narrowly re-elected as MSP for East Lothian with a majority of 151 votes, while his Lib Dem counterpart, Tavish Scott, also held on to his seat, despite losing 20% of his constituency vote in Shetland.

Scottish Tory leader Annabel Goldie returned to Holyrood on the west of Scotland list.

Mr Salmond, who won in Aberdeenshire East with about 64% of the vote, said: "Firstly, I think it demonstrates that Scotland has outgrown negative campaigning.

"I hope after this result we'll see an end to negativity and scaremongering in Scottish politics - no more insults to the intelligence of the Scottish people."

Referring to an SNP forerunner, the National Party of Scotland, he added: "Some 70 years and more later, the SNP can finally say that we have lived up to that accolade as the national party of Scotland.

"We have reached out to every community across this country."

Mr Cameron said he would campaign to keep the UK together, as he congratulated Mr Salmond.

He said: "I passionately believe in our United Kingdom, so I congratulate Alex Salmond on his emphatic win, but I will do everything obviously as British prime minister to work with the first minister of Scotland, as I always do, and treat the Scottish people and the Scottish government with the respect they deserve.

"But on the issue of the United Kingdom, if they want to hold a referendum, I will campaign to keep our United Kingdom together, with every single fibre that I have."

The electorate in Scotland - like those throughout the UK - also voted in the referendum on whether the alternative vote should be used for Westminster elections.

The result, which came in at about 1940 BST on Friday, recorded a "no" to the change.

Figures released by the Electoral Commission showed that Scotland recorded the highest turnout of voters - 50.7% - for the referendum in the UK.

Other key moments of the Scottish elections include:

The independent Margo Macdonald has been returned to the Scottish Parliament as a list MSP in Lothian.

Former Labour MP George Galloway failed in his bid to enter frontline politics at the Scottish parliament after failing to muster enough support on the Glasgow list.

The Scottish Green Party's Patrick Harvie was returned to parliament after winning a seat on the Glasgow regional list.

The SNP made big gains in Labour's traditional heartland of Glasgow, winning Anniesland, Cathcart, Kelvin, Shettleston and Southside, as well as two seats on the Glasgow list.

Labour had better news in Eastwood where it held the Tory target seat. Ken Macintosh fought off advances from Conservative Jackson Carlaw, who was later elected on the west of Scotland list.

With many deposits lost, Mr Scott said his party's problems were down to the coalition government at Westminster.

He said: "What we need to recognise is that the UK coalition did cause our vote to either stay at home or move straight to the SNP.

"People are not happy about us being in the UK coalition and that is what we need to look at and understand."

Jackie Baillie, who was re-elected as Labour MSP for Dumbarton, said Labour's defeat in Scotland was "quite considerable".

Ms Baillie said it could not have been predicted and was reminiscent of the party's general election defeat in 1983.

"I think we need to pause and reflect and take time to consider what this actually means. There is a complexity here that needs to be understood," she added.

Miss Goldie said the Conservatives were "in good heart" and felt they had got a positive message over to voters.

She added: "We have enjoyed the campaign enormously and certainly the Conservatives have seen evidence that their support is holding firm."