Scotland has seen an increase in the number of non-EU nationals living here, according to new figures from National Records of Scotland (NRS).
Numbers of non-British nationals living in Scotland rose by 36,000 last year.
Until recently the number of EU citizens living in Scotland was higher than those coming from outside.
But the latest survey shows a significant increase in the number of non-EU nationals while EU nationals moving here has remained stable.
NRS has published figures which show that in 2019, 388,000 non-British nationals or 502,000 non-UK born people lived in Scotland.
Of all non-British nationals living in Scotland, three in five were EU nationals (234,000) and two in five were non-EU nationals (154,000).
Polish remained the most common non-British nationality, accounting for almost a quarter (23%) of all non-British nationals living in Scotland.
Overall, 7% of Scotland's population were non-British nationals with the bigger cities hosting the most. The highest was Aberdeen with 18%, then Edinburgh with 16% and Glasgow which had 14%.
As for where Scotland's migrants came from, the largest number was from Poland, followed by the Republic of Ireland and then Lithuania.
Indian, Romanian and German citizens all numbered 13,000 each in the Scottish population.
The full report 'Estimates of the Scottish population by Country of Birth and Nationality' takes its data from the Annual Population Survey (APS) and includes estimates for the year to end of December 2019.
It is designed to identify longer term trends and statistically significant changes.