SCOTLAND's population was estimated to be 5,436,600 on Census Day hitting a record high, according to newly released data.
The National Records of Scotland (NRS) said the figures, collected on March 20 2022, "paint a fascinating picture of how Scotland and our communities are changing".
The population increase of 2.7% was largely driven by migration, the results revealed, and would have shrunk otherwise.
This is the largest population ever recorded by Scotland’s Census and is part of the first set of statistics from last year’s census.
The data showed that the population of Scotland grew by 141,200 (2.7%) since the previous census in 2011.
This is a slower rate of growth than between 2001 and 2011, when the population grew by 233,400 (4.6%).
Without migration, the population of Scotland would have decreased by around 49,800 since 2011.
It comes as a survey found that two-thirds of Scots feel that immigration is a good thing for the country.
Elsewhere, the population increased by 6.3% in England and Wales, and by 5.1% in Northern Ireland between 2011 and 2021.
The Scottish Government pledged to address depopulation and social isolation after the findings.
Angus Robertson, Cabinet Secretary for Constitution, External Affairs and Culture, said the low birth-rate showed the consequences of Brexit.
The data also highlights Scotland’s ageing population, with more than one million people aged 65 and over, a total of 1,091,000. It also shows that the number of people in older age groups, over 65, increased by 22.% snce 2011.
It is also over a quarter of a million higher than the number of people under 15, 832,300.
Comparitively, results from the 1971 census showed there were twice as many people under 15 than 65 and over. In 2011, the two age groups were of a broadly similar size.
Across Scotland, the population increased in 17 council areas between 2011 and 2022 and most of the Central Belt saw increases especially around Edinburgh, driven by migration from within Scotland and elsewhere.
Next year results will be published on ethnicity, religion, the labour market, education and housing.
For the first time, it will include data on veterans, sexual orientation and trans status or history.
Janet Egdell, NRS chief executive, said: "This is an exciting milestone for Scotland’s Census and the results paint a fascinating picture of how Scotland and our communities are changing.
“Census data is vital for planning health services, education and transport and the information published through our results will help local and central government, businesses and charities to shape Scotland for years to come.”
Robertson (below) said the figures represent a "historic moment".
“It also confirms this growth has been driven by inward migration, demonstrating that Scotland is an attractive place to come to live and work," he added.
“However, we know Scotland faces an ongoing population challenge with fewer births than deaths registered since 2011, which reinforces how damaging Brexit continues to be with the loss of freedom of movement.
“The census also shows that our population is aging.
“Understanding these changes in the population will allow local authorities and the Government to adapt vital public services to better meet the needs of those living and working in Scotland – including our large, established migrant community, whose contribution we greatly welcome."
The Constitution Secretary said that, as outlined in the Programme for Government, ministers will publish a "depopulation action plan" to tackle population decline in some of Scotland's communities.
“We will also introduce a talent attraction and migration service to support more people to live and work here," he added.
“We have also called on the UK Government to devolve immigration powers to the Scottish Parliament and work with us to deliver our proposal for a Rural Visa Pilot to enable rural and island communities to attract migrants in line with local needs.
“The census also shows a trend towards smaller households and more households overall, which further demonstrates the importance of our strategy to tackle social isolation and loneliness through stronger social connections, and our continued funding for organisations working to address this issue.”
Scottish Tory MSP Donald Cameron, shadow constitution secretary, accused Robertson of being "too complacent" by claiming the population rise shows Scotland is an attractive place to live and work.
"The fact is that the increase in Scotland’s population is less than half the rate seen in the rest of the UK compared to the last census," he said.
“It’s vital we attract more people to Scotland to staff our under-resourced NHS and boost economic growth, but the SNP’s obsession with higher taxation and their failures in public services are all bad signs for future provision, particularly in the context of our ageing population.
“The SNP botched the administration of this census by needlessly separating it from the UK one, and as a result it was late and produced a much smaller return – to the extent they had to bring in an international steering group to check the results. They must not take the same negligent approach to interpreting the results.”