SCOTLAND'S population has risen for the eighth year running with migration driving the increase, latest figures show.

There were 5,424,800 people living in Scotland on June 30, 2017, an increase of 20,100 people (0.4 per cent) on the previous year, according to the National Records of Scotland (NRS) figures.

NRS said net migration was driving the increase despite a fall in the number of people moving from overseas in the year following the EU referendum in 2016.

Over the year to mid-2017, 23,900 more people came to Scotland than left, from both overseas and the rest of the UK.

During the course of that year 13,400 more people migrated to Scotland from overseas than left, however this was lower than the previous year when it was 22,900.

NRS said that, in contrast, natural change has not contributed to Scotland's population growth with 3800 more deaths than births in the year to mid-2017.

Tim Ellis, the Registrar General for Scotland, said: "Migration continues to be the main driver of Scotland's population growth, but in the year following the EU referendum fewer people arrived from overseas than in the previous year.

"Overall net migration, from both overseas and the rest of the UK, remained positive with more people coming to Scotland than leaving.

"The growth in Scotland's population varies across the country – around two thirds of Scotland's councils (21 councils) increased in population over the last year, compared to a third (11 councils) which experienced population decline."

The figures show the population continuing to age, with just under one in five people (19 per cent) aged 65 and over, compared to 16 per cent in 2007.

People aged under 16 made up 17 per cent of the population in mid-2017.

The greatest increase in population was in Midlothian, which grew by 1.7 per cent, while the greatest population decreases were in Aberdeen City, Inverclyde and Shetland Islands where the number of residents decreased by 0.5 per cent over the year to mid-2017.