THE SNP have won a council by-election in Penicuik today.

A by-election was triggered following the death of Councillor Adam Montgomery, who served the Midlothian area for 31 years.

The council elections use the Single Transferable Voting system to elect candidates.

After the Green candidate had been eliminated from the first round of results, and those voter's second preferences redistributed, the SNP were in the lead with 1,803 votes.

They were followed by the Conservatives on 1,469 and Labour on 1,414.

Following the elimination of the Labour candidate, the vote redistribution led to Joe Wallace, the SNP candidate, gaining enough support to win the seat.

Need a reminder how the STV system works?