The number of people moving to the UK from EU countries was the lowest it has been for nearly four years in 2017.
But there was a rise in those coming from outside the EU, the Office for National Statistics said, with net migration the highest since 2011.
Overall net migration, the difference between the number of people coming to live in the UK for at least 12 months and those emigrating, was 282,000.
The government wants to cut overall net migration to the tens of thousands.
The ONS data is for the first full calendar year since the Brexit vote.
While the overall net migration was up by 33,000 on the previous year, statisticians said the figure was “broadly stable”.
The ONS figures showed there were 101,000 net migrants from the EU last year and 227,000 from outside the EU.
There was also a record number of EU citizens emigrating from the UK, with an estimated 139,000 leaving in 2017.
The only other year when the EU emigration figures came close to that level was in 2008 when 134,000 EU nationals left the UK.
The migration report also showed:
The number of EU citizens coming to the UK “looking for work” decreased by a third (33%) from 55,000 in 2016 to 37,000 in the last year.
Meanwhile, those coming to the UK for a definite job remained stable, the ONS said.
“What these statistics show is that more of the people who are coming to the UK are coming for the reasons we would want – to take up a definite job or to study,” immigration minister Caroline Noakes said.
While net migration is continuing to add to the UK population, the 2017 figure of 282,000 is down from record highs recorded in 2015 and early 2016.
It is the highest for 18 months, however – and still well above the government target of less than 100,000. (BBCNEWS)