Media playback is unsupported on your device Media caption BBC One: Scottish independence referendum results programme

The campaign to keep Scotland in the UK has taken the most votes so far in the Scottish independence referendum, as counting continues across the country.

With 26 out of the 32 council areas having declared, the "No" side is on 54% of the vote, with the "Yes" campaign on 46%.

By 05:10 BST (06:10 GMT), the "No" campaign had more than 1,397,000 votes, with "Yes" on just over 1,176,000.

A total of 1,852,828 votes is needed for victory in the referendum.

Glasgow, Scotland's largest council area and the third largest city in Britain, voted in favour of independence by 194,779 to 169,347, with Dundee, West Dunbartonshire and North Lanarkshire also voting "Yes".

But Aberdeen City voted "No" by a margin of more than 20,000 votes, while there have also been big wins for the pro-UK campaign in several other areas.

Polling expert Professor John Curtice of Strathclyde University said the results so far suggested the "No" campaign was going to win the referendum.

Image copyright Newsline Image caption Scottish National Party leader Alex Salmond is en route to the national counting centre in Edinburgh

Clackmannanshire was first to declare, with "No" winning by about 2,600 votes.

Inverclyde voted "No" to leaving the United Kingdom by only 86 votes.

Voters in the Western Isles, Orkney, Shetland and Midlothian also voted against independence, as did local authorities including Stirling, Falkirk, East Lothian, Angus, Dumfries and Galloway, Renfrewshire, East Renfrewshire and South Lanarkshire.

Counting will carry on through the night, with the final result expected after 06:30 BST on Friday.

In other developments:

Police are investigating allegations of electoral fraud relating to 10 ballot papers in Glasgow

The Queen is expected to make a written statement on Friday afternoon, after the result has been confirmed

Prime Minister David Cameron expected to respond to Scotland's decision in a live televised address following the final result

The count in Dundee was briefly suspended due to a fire alarm

For latest results and full coverage, go to bbc.co.uk/scotland-decides

Media playback is unsupported on your device Media caption Clackmannanshire was the first council to declare its result

Blair McDougall, director of the Better Together campaign to keep Scotland in the UK, said: "We think there will be a clear 'No' vote tonight.

"I think the results we have seen now from places like Clackmannanshire - which is an SNP stronghold - are encouraging."

Scottish Deputy First Minister Nicola Sturgeon, a supporter of independence, said it was clear that there remained a "real demand for change" in Scotland, and said the onus was now on the "No" parties to bring forward proposals for further devolved powers.

She added: "This has been a wonderful campaign but tomorrow we must move forward as one country".

Image copyright AP

Scottish First Minister Alex Salmond, who has led the "Yes" campaign, has flown from his home in Aberdeenshire to the national counting centre on the outskirts of Edinburgh.

He had earlier tweeted: "This has been a remarkable day. Scotland's future truly is in Scotland's hands",

A YouGov on-the-day survey published shortly after polls closed suggested "No" was on 54% and "Yes" on 46%.

The survey questioned 1,828 people after they voted, together with the postal votes of 800 people, although it is not a traditional exit poll.

A "Yes" vote in the ballot would end the 307-year-old union between Scotland and the rest of the UK.

Analysis: Brian Taylor, BBC Scotland political editor

The first three results are a hat-trick for the Better Together side but they are three of the smallest council areas in Scotland.

In terms of Shetland, they weren't notably keen on devolution in the first place, so it is no great surprise that they are not exactly giving a resounding endorsement to the concept of independence.

Of the three results, of course, the Clackmannanshire result is far and away the most significant in that it was an area that perhaps should have been doing rather better for the "Yes" side.

Read more from Brian

As soon as Scotland's 2,608 polling places closed, work began to transport hundreds of ballot boxes to counting centres in each of Scotland's 32 local authorities.

These will include votes cast from the 789,024 postal vote applications, which was the largest volume of registration for postal votes ever in Scotland.

Image copyright AFP

And, for the first time, 16 and 17-year-olds all across Scotland were able to vote.

Once the results from all the local authority areas are known, chief counting officer Mary Pitcaithly will declare the result of the referendum at the Royal Highland Centre outside Edinburgh.

However, running totals - which can be made from the first declaration onwards - may indicate a result earlier in the morning.

Many councils reported busy polling stations throughout Thursday, with some seeing queues both ahead of the polls opening and throughout the morning.

East Dunbartonshire has recorded the highest turnout so far, at 91%, with East Renfrewshire and Stirling slightly behind on 90.5% and 90.1% respectively.

But turnout in Glasgow was lower, at 75%, while in Dundee it was 78.8% and Aberdeen 81.7%.

Image copyright PA

Large numbers of independence supporters have gathered in George Square, in the centre of Glasgow, ahead of the result.

Scottish First Minister Alex Salmond, who led the pro-independence "Yes" campaign, cast his ballot at Ritchie Hall in Strichen, Aberdeenshire.

Pro-Union Better Together leader Alistair Darling was greeted by a mixture of cheers and boos as he arrived at the Church Hill Theatre in Edinburgh to cast his vote.

Referendum night

The BBC's Scotland Decides will bring continuous, up-to-date coverage all through the night, as well as comprehensive analysis. On Twitter, keep abreast of all the action overnight via @BBCPolitics and @BBCScotlandNews.

A Scotland Decides programme presented by Huw Edwards will be broadcast on BBC One from 22:35 BST, while Scotland Decides The Result will be broadcast on BBC One Scotland.

Or follow the results on BBC Radio 4's Scotland Decides programme presented by James Naughtie and Rachel Burden. BBC Radio Scotland will also provide live coverage from 22:00 BST until 06:00 BST.

You can also watch and listen to all the live television and radio coverage on the BBC News website.

Did you vote in the referendum? Are you at a referendum party? Send us your pictures and tell us what the mood is like where you are by emailing haveyoursay@bbc.co.uk