The National Records of Scotland (NRS) estimated that in the middle of 2013 there were 5,327,700 people living in the country - an annual rise of 14,100. The increase is 3% greater than the previous year.
For the first time in nine years, net migration from the rest of the UK was larger than that from overseas, according to the statistics for mid-2012 to mid-2013.
But there was a drop in the number of births. While there were 56,843 babies born from mid-2012 to mid-2013, that is 1615 (2.8%) down on the previous year. There was a 3% rise in deaths from 54,235 to 55,934.
And while in-migration exceeded out-migration by approximately 9960, that is down 22% (2775) on the previous year.
Some politicians have been concerned the increase in population is lower than in the past decade, when the average rise has been nearer 25,000 annually.
Scottish Conservative finance spokesman Gavin Brown said: "This is the second year in a row that we have seen a significantly lower level of population growth.
"The Scottish Government were challenged last year to investigate why this happened but they have been silent.
"This could damage the economy in the short, medium and long-term, and it's something that must be addressed now to prevent it becoming a trend."
Some of the population increase was attributed to a rise in the number of prisoners and armed forces personnel in Scotland. In mid-2012 to mid-2013 there was a 3229 increase in their numbers.
Analysts said the rise could be explained through recruitment drives and forces returning from deployment abroad. Troops on deployment out of Scotland for six months or more are not included in their estimates.
About 47,700 people came to Scotland from England, Wales and Northern Ireland, according to the figures. About 39,800 left Scotland to go in the opposite direction, resulting in a net migration gain of 7900. Meanwhile, 28,200 people came to Scotland from overseas and 26,100 left Scotland to go overseas, giving a net migration gain of 2100.
Humza Yousaf, minister for external affairs, said healthy population growth was vital for future economic growth and that the continuing population increase was welcome.
"The sustained trend over the last 10 years is positive, with more people coming to Scotland from the rest of the UK than leaving," he said.
"We value the contribution migrants make to our economy, our culture and our society. That is why we are working hard to attract the best international talent to our universities and our workforce and why those who choose to make Scotland home will always be welcomed."
He said the figures showed Scotland was an "attractive and dynamic nation and one where people want to make a life for themselves".