The first council in Scotland to declare in the European referendum produced a strong victory for the Remain camp.
The island authority of Orkney was the first of the country's 32 local authorities to declare, with the results showing almost two thirds of the votes had gone to Remain.
A total of 63.2% of voters backed keeping the UK in the European Union, with 36.8% voting for Brexit.
Clackmannanshire, Scotland's smallest mainland council, was the second to declare north of the border and also produced a victory for Remain.
A total of 57.8% of voters in the area backed staying in Europe, compared to 42.2% who favoured leaving.
Voters in the Shetland Isles, the most northerly part of the UK, also backed staying part of Europe.
Support for remaining in was 56.51%, ahead of 43.49 for leaving the EU.
In West Dunbartonshire 61.99% backed Remain, while in Dundee the total was 59.78%.
Polls in Scotland have consistently shown a majority for staying in Europe, but across the UK the picture has been less clear.
Newcastle was the first area to declare in England, with the results there showing a much narrower majority for Remain.
But with some results in England showing stronger than expected support for Brexit, former first minister Alex Salmond again warned Scotland could have another independence referendum if the country was removed from the EU against the wishes of voters north of the border.
The ex-SNP leader said there had been "a very strong turn out in Scotland and it's a very strong vote so far for Remain".
But he told the BBC the result across the UK "is going to go right down to the wire".
Mr Salmond added: "Scotland looks like its going to vote solidly Remain. If there was a Leave vote in England, dragging us out the EU, I'm quite certain Nicola Sturgeon would implement the SNP manifesto".
The party's manifesto ahead of May's Scottish Parliament election said Holyrood should have the right to hold a second independence vote if there is a "significant and material" change in circumstances from 2014 such as Scotland being taken out of the EU against its will.
Scottish Labour leader Kezia Dugdale said there were a "lot of very happy, very confident Remain activists" in Scotland.
Speaking in Glasgow she said: "I spent most of the day campaigning myself in Edinburgh. The bookies have said that Edinburgh might be the one place across the whole UK that's going to have the biggest Remain vote.
"That was certainly my experience today. A lot of enthusiasm, a lot of cheers, a lot of thumbs up as we were campaigning across the city. It was very encouraging."
After a "very aggressive campaign" she said that "a lot of people would like politics to cool down a bit now, to be a bit more nuanced, for everyone to be a bit kinder to each other and a bit more considerate about all the big issues that we have to face in the world".
But she said the issue of immigration - one of the key issues in the campaign - would not go away after the referendum vote.
Ms Dugdale stated: "A big part of this campaign has been dominated by immigration and whenever the issue of immigration has come up there has been a sense of the polls tightening, that that's an issue that people have very strong views on. There are no easy answers to that. There certainly weren't any answers on the ballot paper today.
"I'm very proudly pro-EU, very proudly pro-immigration. There's a fantastic value to that in our country but obviously some people have deep concerns about the impact that has on their communities.
"It's now the job of politicians to recognise that and act on that and that's where the conversation has got to go now."
At the count in Glasgow the SNP's Humza Yousaf, said: "From a Scottish perspective I'm quietly optimistic that we will have a Remain vote here in Scotland. What's happening in the rest of the UK is too close to call.
"Early results, such as those from Newcastle and Sunderland, don't give me a huge amount of comfort but we've got a long way to go.
"It's been an excellent campaign for us on the streets, our activists have never let us down. We've had the boots on the ground and spoken to a lot of people and I'm hoping we'll see the fruits of that tonight with a Remain vote."
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies