Scotland has rejected independence, despite the Yes campaign winning a majority in the largest city.

While Glasgow voted in favour of independence, the margin of victory was not large enough to give Alex Salmond and his campaign the momentum they need.

There were also wins for Yes in three of Scotland's 32 local authority areas - Dundee, West Dunbartonshire and North Lanarkshire.

While there was a comfortable majority in Dundee, the turnout in the city was 78.8% - lower than many other parts of Scotland, indicating that the Yes campaign has not managed to get voters out in sufficient numbers.

The turnout in Glasgow was even lower at 75%, with 194,779 Yes votes (53.49%) and 169,347 No votes (46.51%).

At the same time, nationalists conceded defeat in Alex Salmond's Aberdeenshire constituency.

SNP MSP Stewart Stevenson said: ''At the end of the day, you always prefer to win but we always knew the size of the mountain we had to climb in Aberdeenshire.

''The challenge now bluntly, in Aberdeenshire and elsewhere, is for those who've won the referendum to deliver on the promises that they made to the people of Scotland."

First Minister Alex Salmond said Scotland's future was in Scotland's hands, as counting continued in the independence referendum.

But with 23 of 32 results declared it looks as though Scotland is staying with the UK.

The SNP had pinned its hopes on a big win in Glasgow - and it didn't get one.

Although the city voted yes, the margin was not big enough to swing the result overall.

A rejection of independence will be a blow to Alex Salmond.

Conversely it will help re-ignite the political career of former Prime Minister Gordon Brown who has led the 'No' campaign is recent days.

With turnout expected to be extremely high, senior members of both the Yes and No camps were focusing on the historic nature of the vote.

Mr Salmond tweeted: "This has been a remarkable day. Scotland's future truly is in Scotland's hands."

Earlier, SNP deputy leader Nicola Sturgeon hailed the ballot as "an amazing, emotional, inspirational day of democracy".

Labour's leader in Scotland Johann Lamont said that voters north of the border had cast "the most important votes of our lives".

Ms Lamont said: "Today the people of Scotland have cast the most important votes of our lives. Thank you to everyone who has worked for a No today."

And Ms Sturgeon tweeted: "So that's that. Polls have closed. What an amazing, emotional, inspirational day of democracy this has been. Now we wait."

Blair McDougall, the Better Together campaign director, welcomed the high turnout, which was widely predicted to top the 83.9% recorded in the 1950 general election - the highest in the UK since the introduction of universal suffrage in 1918.

Mr McDougall told Sky News he believed a No vote would be revealed over the course of the night.

He said: "I think there has been an extraordinary turnout tonight - near 100% turnout in some places.

"I think it's great for Scottish democracy, it could be great for Scotland. I think there will be a strong No vote and I think it will mean a better future for people in Scotland."

Scottish Secretary Alistair Carmichael told Sky News: "It looks like we have a good turnout, that's important.

"It has been on the Yes side quite in your face and I have had people coming to me on the doorstep and in the streets saying, whispering almost, 'I'm voting No, I'm on your side'.

"But because the Yes campaign have been so in your face, and you have had some quite sinister points in this campaign - you had the 1,000 people trying to influence the BBC on Sunday night, you had Jim Sillars, one of the most senior people in their campaign talking about there being a day of reckoning.

"What we have got now is a timetable that makes it clear the extra powers we all know the Scottish Parliament needs to finish the process of devolution, which then unlocks the door to constitutional reform across the whole of the United Kingdom, will definitely be delivered."

The chairman of Yes Scotland said he was not conceding defeat, despite a YouGov survey suggesting that Scots have rejected independence by a margin of 54%-46%.

Former Labour MP Dennis Canavan told Sky News: "I'm still optimistic ... I'm not at this stage conceding the result."

Mr Canavan said it was "probably correct" that today's vote would settle the independence question for a lifetime.

He said while the Yes camp had fought a "very positive campaign, a magnificent campaign", the No message was characterised by "a bit of negative scaremongering going on, a bit of collaboration, perhaps even collusion, on the part of the British establishment".

Liberal Democrat MP for Gordon and No supporter Sir Malcolm Bruce said he believed that "reality has kicked in" with voters switching back to No after being briefly seduced by the Yes campaign's message.

Sir Malcolm said: "Certainly we felt that the campaign was swinging back to our side - if it ever really swung away to the extent that people suggested - both in terms of our canvassing and the responses we've been getting as people came out of the polling stations.

"I will be very well satisfied if the campaign to keep Scotland in the UK has succeeded. I believe it's in the best interests of Scotland and the UK that that should happen."

With two Scottish Nationalist parliamentarians - Angus MacNeil MP and Alasdair Allan MSP - the Western Isles is expected to have one of the largest turnouts in Scotland and to far exceed the General Election figure of 66.1 per cent in 2010, when there were five candidates.

Out of an electorate of 22,908, the turnout for postal votes including postal proxies was 5,125, which represents almost 90%.

Dr Allan, who led the Yes Camapign, said during the count: "It has been a closely fought campaign both nationally and in the Western Isles. We have fought a long and positive campaign against an absolute onslaught of fear-mongering by the UK Government and their friends in the national media. I hope the Western Isles will chose a better future for Scotland."

Liberal Democrat Deputy Prime Minister Nick Clegg said in a tweet: "The people of Scotland have cast their votes. I sincerely hope that they remain a part of our family of nations."

Former Liberal leader Lord David Steel told Sky News: "Nearly half of Scotland is going to be disappointed with the result whichever way it goes.

"Therefore, there is an obligation on the politicians to take that into account and to be very mindful and sensitive to half the population who have not voted for the result.

"I think it is very important they don't just talk about greater powers for the Scottish Parliament, but they have got to talk to look and see how they reorganise the United Kingdom."

Michelle Thomson, managing director of the pro-independence Business for Scotland campaign, said the Yes campaign would respect the result of the ballot, even if it meant continued membership of the UK.

She told Sky News: "This is all about the settled will of the sovereign people of Scotland, and if that is what they express, then of course the wider Yes campaign will accept that. That's the whole point.

"Really, then the emphasis will be on Westminster to make good the promises they've made within the timetable they have set out.

"Certainly Scotland will move forward together, there will be a tomorrow, we will continue to be the best of friends."

At the count in Glasgow, Patricia Ferguson, Labour MSP for Maryhill and Springburn said: "I think it's exciting but nerve-wracking.

"It's been a very, very long campaign and today has already been a long day and it's not quite over yet.

"I think everyone will be glad to get the result and move on."

Former Scottish Secretary Michael Moore, the Lib Dem MP for Berwickshire, Roxburgh & Selkirk, told Sky News: "In the last couple of weeks, the arguments about the NHS and other aspects of public services in Scotland which are fully devolved already became very serious parts of the campaign.

"If we are candid, I don't think at all times we were smart enough and quick enough to respond to those particular points.

"But there is a real desire it seems to me for change and the importance for all of us on the Better Together side is that the commitments we made in recent times, about further devolution to Scotland, if we stay part of the UK, those have to be delivered and quickly."

SNP national women's officer Tasmina Ahmed-Sheikh, a member of the Yes Scotland advisory board, said "Scotland has won" whatever the outcome.

"The polls have spoken but we will see what the people of Scotland have said," she said.

"We absolutely believe in the democratic will of the people of Scotland, and that will prevail, so I think we will just wait for the actual result when it comes through.

"What we are seeing is a massive engagement of people across the country, and I find that really refreshing.

"People coming up from 7am, unheard of queues at polling stations, so I think that says an awful lot.

"I think at the end of the day Scotland has won, without a doubt, whatever the outcome, simply because we have got so many people now interested in the future of this country."

Liberal Democrat leader in the House of Lords Jim Wallace said: "Never write Alex (Salmond) off... it's not for me to say what he should do.

"He'll have some hard thinking to do. I think he will be in a difficult position - he has led his troops to the top of the hill, it's difficult to march them down again."

Actress, comedian and Yes campaign advisory board member Elaine C Smith said of the referendum campaign: "People have something to vote for.

"The argument, the engagement, I love the fact that people in pubs are talking about what currency we're using and what we're going to do with the National Health Service, and not just going 'we'll leave it to those guys in suits'.

"I feel very grateful to be alive and to be part of this - even though I'm knackered."

Speaking at the Edinburgh count, Green MSP Alison Johnstone said: "I have been chatting to campaigners and activists on both sides - obviously there is a great deal of interest but there is a long night ahead.

"Obviously there was a YouGov exit poll earlier on, but we will wait and see. I think it is too early in the evening to say one way or the other.

"It is really exciting - the fact that the campaign has engaged so many people. It has got people who have never been involved in politics involved. It has been a successful campaign in those terms certainly."

There were also early appearances at Ingliston from Yes Scotland chairman Dennis Canavan, Lib Dem MP Sir Menzies Campbell, and fellow Lib Dem and Advocate General for Scotland Lord Wallace.

After the first result saw No win Clackmannanshire by a margin of 54% to 46%, Labour's former Cabinet minister Lord (John) Reid told BBC News: "I'm delighted that we've won the first to be announced. I think it was quite a clear victory, but it's one and there are another 31 to go.

"I'm sure we'll win some and lose some, and it will probably be some hours before the pattern emerges, but to win by about 10% I think is gratifying."

Labour MP Thomas Docherty said he is confident No will win in Fife, after seeing samples of the votes being taken out of ballot boxes and postal votes.

The Dunfermline and West Fife MP told BBC News: "What's very clear tonight is that Fifers have said No. We don't obviously have the final figure and we're some time away from having that, but it looks like Fife has voted No tonight.

"We've had very, very strong results in some places. We've won almost every polling district in Dunfermline and West Fife and every polling district in North East Fife and it's quite clear that some of those margins that we have been stacking up look very nice indeed tonight."

Scottish Labour deputy leader Anas Sarwar, MP for Central Glasgow, said: "It's been a very encouraging start for us but we've still got a long night ahead.

"What we are all struck by, whether Yes or No campaigners or supporters, is the incredible turnout that we've seen in this referendum campaign.

"The challenge for all of us is to tap into that real desire for change and to take on the task of unifying our country whatever the result, and bringing people together to create a better future for ourselves and for future generations.

"Our country is divided. We've got to make sure we bring people together."

He said on the Glasgow turnout: "Given Glasgow's historic turnouts, turnout today is pretty good, although less than in other places.

"The challenge for all of us is to make sure we keep people engaged in the political process beyond the referendum.

"How do you do that? It's by recognising that our politics is broken and our economy is broken. And we've got to fix them both."

Dennis Canavan, chairman of Yes Scotland, said: "I am conceding nothing at this stage because less than a handful of local authorities have declared so far, and these local authorities are not exactly a representative body of Scotland, in the sense that they are very, very small populations.

"We could have, say, one big local authority declaring in the next hour or so and we could be running neck and neck again.

"So at this stage I am still optimistic, I am still hopeful, and we will see how it goes."

Speaking from the Edinburgh count, Scottish Socialist Party spokesman Colin Fox, a key figure in Yes Scotland, said tonight's result looks likely to be "independence deferred".

The unionist parties will "rue the day" if they fail to deliver meaningful new powers to Scotland, he added.

"We're looking forward to some Yes victories in Glasgow and Dundee and perhaps elsewhere, and I think that will be welcome news," he said.

"The big story tonight is the astonishing levels of turnout in a political contest in Scotland, which is on a par with North Korea, China, Cuba and those places.

"I think it's remarkable and I certainly want to pay tribute to the Yes campaigners who over the last two years have energised this country. Clearly both sides of the campaign deserve credit for those levels of turnout."

Commenting on the relatively lower turnout in Glasgow in comparison with other areas, Mr Fox said: "Glasgow's turnout in the Scottish Parliament elections is usually 40% and it is now 75%, so that's not to be sniffed at.

"Let's hope we can keep it at that level, I think it's astonishing. Nearly doubling the turnout in Glasgow is a significant achievement for Scotland's biggest city, with the greatest deprivation and the biggest social problems."

He added: "In the last 10 days the British political establishment threw everything including the kitchen sink at the people of Scotland, every threat imaginable.

"Every propaganda trick was used and it's clearly had an effect. They've frightened people. The elderly and the middle class are largely the No voters tonight, and the working class people across Scotland we will find in huge numbers backed the Yes campaign.

"Today, the choice has been between independence and independence deferred, and it looks like we are going to get independence deferred.

"I don't think these three parties have got anything in common with these new powers. They're phantoms, they're mythical, and I think if they don't deliver meaningful powers if we get a No vote then I think they will rue the day."

The Yes campaign has demonstrated the social democratic and socialist values of a large number of Scottish people, which "has got to be good for the future of the left".

He added: "We rejected the xenophobic, warmongering, dog-eat-dog, devil take the hindmost politics of Westminster and so have an enormous proportion of the Scottish population.

Former Scottish Socialist MSP Tommy Sheridan told the BBC: "I am feeling almost broken-hearted. I feel that the British establishment has mobilised the big guns, they've mobilised the bankers, they've mobilised the billionaires, they've mobilised the supermarkets.

"They've all been corralled into Number 10 to get out there and give their warnings and frighten people and I think people have been frightened, people have been genuinely frightened by some of the threats that have been issued."

Former Scottish Secretary Michael Moore, the Lib Dem MP for Berwickshire, Roxburgh & Selkirk, told Sky News: "In the last couple of weeks, the arguments about the NHS and other aspects of public services in Scotland which are fully devolved already became very serious parts of the campaign.

"If we are candid, I don't think at all times we were smart enough and quick enough to respond to those particular points.

"But there is a real desire it seems to me for change and the importance for all of us on the Better Together side is that the commitments we made in recent times, about further devolution to Scotland, if we stay part of the UK, those have to be delivered and quickly.

"We have become a divided nation and we will need quickly to heal those wounds and get on with politicians in Scotland, of all parties, making sure we calm the temperature and I hope channel the energy we have got from people across the countryto make Scotland a changed and better place."

SNP national women's officer Tasmina Ahmed-Sheikh, a member of the Yes Scotland advisory board, said "Scotland has won" whatever the outcome.

"The polls have spoken but we will see what the people of Scotland have said," she said.

"We absolutely believe in the democratic will of the people of Scotland, and that will prevail, so I think we will just wait for the actual result when it comes through.

"What we are seeing is a massive engagement of people across the country, and I find that really refreshing.

"People coming up from 7am, unheard of queues at polling stations, so I think that says an awful lot.

"I think at the end of the day Scotland has won, without a doubt, whatever the outcome, simply because we have got so many people now interested in the future of this country."

Liberal Democrat leader in the House of Lords Jim Wallace said: "Never write Alex (Salmond) off... it's not for me to say what he should do.

"He'll have some hard thinking to do. I think he will be in a difficult position - he has led his troops to the top of the hill, it's difficult to march them down again."

Actress, comedian and Yes campaign advisory board member Elaine C Smith said of the referendum campaign: "People have something to vote for.

"The argument, the engagement, I love the fact that people in pubs are talking about what currency we're using and what we're going to do with the National Health Service, and not just going 'we'll leave it to those guys in suits'.

"I feel very grateful to be alive and to be part of this - even though I'm knackered."