Scotland is the only part of the UK whose population is expected to fall over the next 20 years. According to the latest projection from the National Records of Scotland, the Scottish population will reach an historic maximum of 5.48 million in 2028 and then drop back to 5.39 million by 2045.

Scotland’s population first reached five million just before the Second World War. Between then and the year 2000 it increased by only 56,000 – just over one per cent. Though this period covers the “Baby Boom”, with more than 100,000 births each year between 1960 and 1965, Scotland’s population barely rose.

The reason? Scots were moving to the rest of the UK and to other parts of the world where jobs were plentiful and immigration policies relaxed. Between 1951, when migration estimates started, and 2000, net emigration from Scotland was 482,000 – about the same as the present-day populations of Aberdeen City plus Aberdeenshire.

Since 2000 the emigration outflow has become an inflow, taking Scotland’s population to its highest ever level.

More people came to Scotland than left. Between 2001 and 2020, 784,000 people left Scotland for addresses in other parts of the UK, but 940,000 people came to Scotland – a net flow of 156,000.

From overseas, the inflow was even larger. An outflow of 462,000 was more than offset by an inflow of 712,000 – a net flow of 250,000. So in the course of 20 years, net migration increased Scotland’s population by more than 400,000 or 7.4%.

This is a very significant change in Scotland’s demographic makeup, reversing trends that seemed to be embedded during the 20th century.

Reasons for migration are complex, as are the changes they bring to the national character and outlook. Economic advantage is always an important driver for changing location. Most migrants are young, often motivated to improve their career prospects.

Between 2001 and 2020, the average age of those moving to Scotland from the rest of the UK was 32, while those leaving Scotland for destinations within the UK had an average age of 31.

Overseas migrants were younger. Those leaving Scotland were aged 29 on average, while those coming in were aged 26 on average. The young age of the overseas entrants partly reflects the success of Scotland’s universities and colleges in attracting foreign students, who then choose to make their careers in Scotland.

Older people also move, but in much smaller numbers. Such moves are more likely to be due to a lifestyle choice or to be closer to family and friends than for career advancement. Healthcare and the regulations around its access are often a concern for older migrants and restrict their willingness to move.

This is less of a concern within the UK due to the access that all citizens have to the NHS. Although overseas migrants outnumber those from the rest of the UK in younger age groups, among pensioners those coming from the rest of the UK exceed those coming from overseas by a factor of five. In the last 20 years, around 13,000 more pensioners came to Scotland than left for other parts of the UK, while 5,000 more pensioners went overseas than came to Scotland from abroad – perhaps the “retirement to Spain” effect.

Different parts of Scotland vary in their attractiveness to migrants. Those from other parts of the UK are spread widely. Although the Central Belt has around 70% of Scotland’s population, it is only in Edinburgh that net migration from other parts of the UK exceeded 5% of the resident population in the last 20 years. But in each of the local authorities in the Highlands, the Islands and the Borders, the growth has been well in excess of 5%. Orkney comes out top, with more than 14% of its population having moved from other parts of the UK in the last 20 years.

There is a huge contrast with the spread of overseas migration into Scotland: here the cities come into their own. Between 2000 and 2020, almost 90% of the net flow into Scotland from overseas went to Aberdeen, Dundee, Edinburgh or Glasgow. Universities and colleges will have played a major role in attracting them to Scotland.

The latest population projections assume a continuing net inflow of migrants to Scotland, both from the rest of the UK and overseas, of around 19,000 each year – not far from the average for the last 20 years. But the population starts to decline because the other component of population change – the natural increase – turns severely negative towards the end of this decade, with deaths exceeding births by more than 20,000. So the total population starts to slowly decline.

And the assumption that overseas migration will continue at roughly the same levels as in the past seems to ignore the reality of Brexit. Overseas applications for National Insurance numbers to work in Scotland fell from a maximum of 56,000 in 2006/07 to 26,000 in 2019/20 – before the pandemic had hit. It also predated the end of the Brexit transition period, but the attractiveness of the UK to European workers was already dropping due to uncertainty about their future status. The pandemic further worsened the situation, with only 11,000 applying for NI numbers in Scotland in 2020/21. Not surprisingly, many of our key industries have been unable to find the workers they need for the recovery phase.

Brexit casts further doubt over the future course of Scotland’s population. The assumption about net migration flows looks optimistic given its impact on the employment of overseas workers. The National Records of Scotland describes its future population figures as projections rather than forecasts. It produces variant projections based on different levels of fertility, life expectancy and migration. Nevertheless, these receive less attention than the central projection quoted here. If it turns out to be over-optimistic, it will fuel the case that the Scottish Government has already made that it should have some influence over immigration policy in Scotland.

Plans for a Scottish migration policy were included in the 2014 White Paper. These are unlikely to be substantially tweaked in an Indyref2 manifesto. The plan to continue in the Common Travel Area (CTA) would surely remain and would probably not be difficult to negotiate since Ireland is already a member. It would allow for visa -free travel and the right to work or study anywhere in the British Isles.

It also grants access to social benefits and healthcare rights. Thus, Scottish citizens in England would receive free healthcare in England, just as Irish citizens currently do. And for English citizens migrating to Scotland, the same would be true. Thus, there might still be a net flow of older migrants from England to Scotland, as there are at present.

As far as social benefits are concerned, the Scottish Government would likely seek the kind of arrangement that Ireland and the UK negotiated at the time of Brexit.

Known as the Social Protection Agreement, it guarantees rights to benefits for Irish citizens living the in the UK and vice versa. The Scottish-rUK version would necessarily be more complex due to the need to also break-up the arrangements by which Scottish and English taxpayers fund benefits.

And if Scotland were to join the EU, freedom of movement would continue to apply, as it did pre-Brexit.

EU citizens could work and study in Scotland, but would not enjoy the benefits of belonging to the CTA. The Indyref2 manifesto would likely also include proposals to make movement into Scotland from outside the EU easier than now, though the current UK-regime has itself become significantly less stringent post-Brexit.

For example, from July 2021, international students with a first degree or masters qualification can apply for two years’ work experience in the UK and PhDs can apply for three years. An independent Scotland might have to make a more generous offer to attract such students.

Proposals for a wide definition of citizenship, including those who are “habitually resident” in Scotland, are likely to remain. Again, the underlying agenda is to boost population numbers and so improve economic performance and offset, at least partially, the effects of population ageing – which is happening more rapidly in Scotland than in other parts of the current UK.

David Bell is Visiting Professor Adam Smith Business School, University of Glasgow