Inward migration 'needed to boost Scotland's population'
Scotland's deaths could outweigh births over the next 25 years - sparking calls for increased inward migration.
The National Records of Scotland has released its latest projections which predict there will be 240,000 more pensioners by 2043, a 23.2% increase.
Meanwhile, the working age population is set to fall by 7,000 and life expectancy is projected to increase.
The Scottish government has called for immigration powers to be devolved in a bid to safeguard public services.
Scotland's culture secretary Fiona Hyslop said: "We want people in Scotland to live longer, healthier and happier lives so this projected increase in life expectancy is extremely welcome.
"But today's figures do not take into account the damaging potential impact of Brexit."
She added: "Our pension age population is projected to grow while our working age population falls, and could decline even further if EU migration is reduced.
"This is why Scotland needs inward migration to support our public services and economy, particularly in sectors like tourism, hospitality, construction and agriculture, but also to enrich and diversify our society."
Despite a widening of the gap between births and deaths, Scotland's population is predicted to slowly increase, largely due to migration, by 2.5% in the next quarter of a century.
The projections suggest the figure could reach 5.57 million.
But a possible downturn in migration could cause the rise in population to stagnate.
The figures suggest that if migration from the EU drops by 50%, population growth is expected to slow to just 1% in the next 25 years.
If it is stopped altogether, numbers could decline by 0.5%.
The Scottish government recently set up a ministerial taskforce to look at Scotland's future population challenges and develop new solutions to address demographic changes.
These include supporting rural settlement and growing the working age population.
Prof Michael Anderson, an expert on Scottish demography at the University of Edinburgh, warned against exaggerating the effects of the changes.
But he said: "The point that underlies all of this is that migration and fertility depend on uncertainty.
"So if you increase uncertainty like Brexit or a second independence referendum, they are perhaps likely to keep fertility down and have some impact on migration."
Paul Lowe, chief executive of the National Records of Scotland, said while Scotland's population is projected to continue increasing, it will be at slower rate than it has done in previous years.
According to the latest projections, the population of the UK as a whole will grow at a faster rate than Scotland, increasing by 9.0% to reach 72.4 million by mid-2043.
If these changes were realised, Scotland's share of the UK population could fall from 8.2% to 7.7% by mid-2043.