Counting is under way at the Scottish Parliament election.

Polling stations have closed following 15 hours of voting. The first result is expected to be declared after midnight.

Ballot papers were issued to 4,099,547 registered voters, who will elect 129 MSPs to serve for the next five years.

The first results to be announced will be the 73 local constituency contests. These MSPs are elected under the first past the post voting system with the candidate with the most votes winning.

A further 56 seats will be allocated on a proportional basis across eight regions. These results will come later as the constituency results form part of the system which allocates regional MSPs to successful parties.

To form a majority government a party must win 65 seats. If no party manages to secure a majority then they can form a coalition with another party or parties to get the required numbers. Alternatively a party can attempt to govern with fewer than 59 seats as a minority government.

Since 1999 Scotland has been governed by coalitions, minority and majority governments.