Scotland needs to attract 20,000 immigrants a year to save the economy from collapse over the next 30 years, a government-backed report warns today.

The alternative is an impoverished future, with a shrinking younger workforce supporting an ageing population.

By 2040, says the report from the Economic and Social Research Council, nearly one-third of the population will be aged 75 and over. Shortage of labour will drive up wages, make our exports less competitive, and wreck the economy.

It is a more pessimistic picture than the more recent figures published in October by the Registrar General for Scotland, which said the current population of 5.12 million would rise to 5.37 million by 2031, with births peaking then at 57,600.

However, the ESRC report says the recent net annual increase in population may be a blip ahead of a long-term decline.

For the first time, it examines the reasons why Scottish birth rates are the lowest in the UK. It found that Scotland is becoming a nation of small families. Although Scottish mothers start having children earlier, they have much larger gaps between births. They are most likely to stop when they have two children, compared with English women who go on to have three or four.

The report found that Scottish women often wanted bigger families, but kept them small because of the demands of work or worries about their finances and living conditions.

The total fertility rate, 1.62, is slightly above the EU average but 24% below the level needed to prevent a drop in population.

According to one of the authors, David Bell, professor of economics at Stirling University, yesterday, we will have to look beyond the EU to meet this need, which could run counter to UK immigration controls unveiled by the Westminster government on Wednesday, closing off Britain to unskilled migrants from outwith the EU.

"The drop in population is part of a world-wide trend which you can trace back, basically, to the contraceptive pill," he said. The difference in fertility between Scotland and England comes down to the larger influx of immigrants to the south. They were younger and had bigger families. The report is the outcome of a £300,000 res-earch project hatched two years ago by the then Scottish Executive and the ESRC. The findings will be tabled today at a conference in Edinburgh.

A Scottish Government spokesman said: "Clearly a growing population has a key role in growing the economy. Recent population projections have been optimistic, however, we must address the significant and long-term population decline.

"This is why we have set an ambitious population target for Scotland as part of our Economic Strategy - to match average European population growth in Scotland from 2007 to 2017, supported by increased healthy life expectancy."

Iain Ferguson, of CBI Scotland's policy executive, said the key was to retain Scottish graduates and move people from benefits into work.

He said: "CBI Scotland has long supported the Fresh Talent Initiative as a means of encouraging students from outwith the European Economic Area to remain living and working in Scotland after they graduate, but more must be done."

Lindsay Scott, of Help the Aged, called for a change in ageist mindsets so that older people could continue to contribute to the economy.