The population increase was caused by net migration sitting at 56,400.

For the ninth year in a row, according to the figures, the number of deaths in 2024 exceeded the number of births.

Scotland has more people than ever before. (Image: NQ)

NRS estimates show a substantial increase in the over-75 population in the next two decades, rising by 68.6% to more than 800,000 in 2047 while younger age groups could see a decline.

Both the under-15 age group and those aged between 16 and 29 will see a decrease, according to the estimates, of 9% and 6.2%.

The demographic changes mean demand for age-specific services such as social care and education will also shift.

The 30-44 and 45-59 age brackets are also set to see increases of 10% and 3.6% respectively, according to the estimates.

Read more:

Andrew White, head of population and migration statistics at NRS, said: “These demographic changes bring opportunities and challenges to people in Scotland.

“Scotland’s population has never been so big or had as many people aged 75 and over. At the same time, we’ve never had so few births. These are unprecedented demographic shifts.

“Our statistics also inform the future. We are projecting a further significant increase in the number of people aged 75 and older in the coming decades.

“At the same time, the numbers of children and young adults are projected to decrease. This tells us that demand for age-related services such as childcare, education, housing, healthcare and social care will change.”