A projected influx of 380,000 new migrants in the next 25 years has been welcomed by the Scottish Government.

Scotland's population is expected to rise by 9% by 2037 to 5.78 million, with more than four-fifths of the rise from inward migration, according to the National Records of Scotland (NRS).

Culture Secretary Fiona Hyslop, whose brief includes national records, said: "Scotland is more multi-cultural than ever before, with an increase of three percentage points in the number of people living in Scotland who were born outside the UK.

"The first census release in December 2012 revealed that Scotland's population is now the highest in history, and between 2001 and 2011 there was a six per cent increase in the number of people of working age (16-64 years).

"This publication shows that Scotland's population is projected to increase by 470,000 people over the next 25 years. I am pleased to see that 81% of this increase is attributed to continuing inward net migration. The Scottish Government welcomes the contribution that new Scots will make to our economy and society."

More migrants could mean one less person for each 100 people of working age to support, according to the report.

Every three people of working age will have to support two dependents from the growing ranks of pensioners and children by 2037, statisticians predict.

The overall projected "dependency ratio" of 66 dependents per 100 people of working age by 2037 does not take into account the unemployed, older schoolchildren, students and early retirements.

Statisticians have also produced alternative projections for higher or lower migration.

Fewer migrants will mean one extra pensioner but 1.5 fewer children to support, while more migrants will mean 1.4 fewer pensioners but just 0.3 more children to support as the ranks of working age people grow, according to alternative assumptions.

The overall dependency ratio for 2037 drops from 66.1 to 65.5 if low migration is assumed, but drops even further to 65.0 per 100 if higher migration is assumed.

Dependency ratios "provide a useful way to examine the relative age structure of the population" but should be interpreted with care, according to the report.

"A simple interpretation is the number of older people or children who are 'dependent' on the working age population, the assumption being that most older people and children are not economically active," the report states.

"The reality is of course much more complex, since, to give just a few reasons, many people of typically working age are unemployed or economically inactive, e.g. at school or university, the age at which people retire varies greatly and many retired people are financially independent."

Comparable 2012-based projections for European countries are not available but comparing the last set of 2010-based projections they show decreases between 2010 and 2035 in eastern Europe, and rises in western Europe and Scandinavia.

Bulgaria, Latvia, Lithuania, Romania, Estonia, Hungary and Poland are all projected to see populations fall by between 5% and 15%, although Germany is also expecting a drop.

Luxembourg, Cyprus, Ireland, Norway and England are projected to see the largest rises of between 18% and 29%, compared with a 10% projected increase for Scotland. The 2012-based projections for Scotland now project an increase of 9% by 2037.

Scottish Conservative health spokesman Jackson Carlaw MSP said: "Scotland is clearly an attractive place to come for migrants from all over the world who are important to the economy, because they help to meet shortfalls in the labour market.

"The projected increase in elderly people in Scotland is not a surprise but nevertheless represents a huge challenge.

"While it's welcome that so many people will live longer, healthier lives, we have to be ready to meet the consequential resource demand on public services and our health service in particular.

"Our NHS and councils are already at full stretch coping with Scotland's ageing population, so the Scottish Government needs to urgently articulate in detail how we will all need to adapt as the issue becomes ever more acute."

Liberal Democrat health spokesman Jim Hume said: "This is a clarion call for governments and countries in the UK to work together, not to break apart.

"The broad shoulders of the UK partnership of nations allows us to share the costs of pensions and benefits across a wider population. John Swinney's leaked paper recognised that the UK absorbs the risk of growth in demand on our public services caused by changing demographics.

"In private the SNP recognise that Scotland will face an increased demand on public services but in public, SNP ministers deny that Scotland's population is ageing faster than the rest of the UK. This brazen attitude to real challenges has already got the Deputy First Minister into hot water with the UK Statistics Authority.

"With Scotland's dependency ratio projected to be higher than the rest of the UK's, people deserve more than distortions and assertions from the nationalists."