Polls close in Scottish council election
The polls have closed the Scottish council election.
Sunny and dry weather across the country meant parties were hopeful of a good turnout.
Counting is due to get under away at about 09:00 on Friday with the first results coming in by lunchtime.
The election uses the single transferable vote system (STV), with voters ranking candidates in order of preference.
People aged 16 or over were eligible to take part in the election, with more than 4.1 million people registered to vote.
A total of 1,227 councillors will be elected across the country's 32 local authorities, with more than 2,500 candidates putting themselves forward.
Election staff in Moray set up a polling station in a car after arriving on Thursday morning to find the polling place locked up.
Presiding officer Simone Evans put polling station notices in the windows of her Ford Galaxy, parked outside the Royal British Legion branch in Buckie.
She put the ballot box on the front passenger seat and cleared the rear seat so that voters could have privacy to cast their vote.
The SNP were fielding 625 candidates, with Labour putting forward 453 and the Conservatives 380.
Meanwhile, the Scottish Liberal Democrats had 247 candidates standing, and the Scottish Greens 219. There were 499 independent candidates, and 148 from other parties.
In the last election five years ago, the SNP secured 503,233 first preference votes and returned 425 councillors, with Labour winning 488,703 first preference votes and seeing 394 of its candidates elected.
But the SNP won overall control of just two councils, Angus and Dundee, while no party had overall control in 26 of the 32 local authorities.
The Conservatives, Liberal Democrats and Scottish Greens will also be looking to make gains this time around, after returning 115, 71 and 14 councillors respectively in 2012.
However, the single transferable voting system makes it harder for parties to win outright control of local authorities, meaning that the SNP won overall control of just two councils, Angus and Dundee.
At the same time Labour won majority control in four areas, holding on to power in Glasgow and North Lanarkshire, and winning Renfrewshire and West Dunbartonshire, where previously no party had a majority.
No party was in overall control in 26 of the 32 local authorities, with coalitions being formed in many councils, while some have been operating as minority administrations.
Elections are also being held in 34 councils in England, and all 22 councils in Wales on Thursday.
There will be full live coverage of the results on the BBC website, and across the BBC's television and radio programming.
How to vote in the Scottish council election
You will be voting to elect three or four councillors to represent your ward on the local council. Full details of wards, candidates and polling places are available on your local council website.
The ballot paper lists the name of each candidate along with their party name, party logo and their address.
Rank the candidates in order of preference. Put a 1 next to your first-choice candidate, a 2 next to your second-choice, a 3 next to your third-choice, and so on.
You can rank as few or as many candidates as you like.
If you make a mistake then you can ask the polling staff to give you another ballot paper.
To be elected a candidate must reach a set amount of votes known as the quota.
The votes are counted in stages. In the first stage only first preferences are counted. Anyone who reaches the quota is elected. Any votes received over the quota are not needed by the elected candidate and so are transferred to the second preference.
If not enough candidates have then reached the quota, the candidate with the lowest number of votes is eliminated and all of their votes are passed to the next preference on the ballot papers.
Full details of how to vote are available on the Electoral Commission website.