Scotland's population grew by more than 22,000 in 2006, new Scottish Executive figures have suggested.
Immigration and migration led to much of the population rise
The latest mid-year population estimate put the population of Scotland on 30 June last year at 5,116,900 compared with 5,094,800 in 2005.
Immigration from abroad and migration from the rest of the UK was responsible for much of the rise.
The figures represent the fourth consecutive year that Scotland's population has increased.
The data compiled by the Registrar General for Scotland also indicated the population had increased by 0.5% over the last 10 years. Previous studies have predicted the population would peak by 2019 before falling away to under 5 million.
The report found the number of deaths exceeded the number of births by only 300 compared with 2,300 the previous year.
Aberdeenshire had the largest percentage population increase after recording a 1.4% rise last year.
Edinburgh, East Lothian, Moray, Stirling and West Lothian also had increases of 1% or more, with Inverclyde experiencing the largest percentage population decrease at 0.7%.
Over the year 53,300 people came to Scotland from England, Wales and Northern Ireland and 44,400 left Scotland to go in the opposite direction.
While 42,200 people, including asylum seekers, came to Scotland from overseas and 29,500 left Scotland to move abroad. The net population increase of 12,700 is 5,000 higher than the previous year.