Immigration hit another annual record with a net 72,400 people coming to live in New Zealand in the year to July.
A strong economy and demand for skilled workers are influences in bringing new people into the country, as well as in New Zealanders returning home.
For the month, there was a seasonally-adjusted net gain of 5800 people.
LISTEN TO MORE: Slice of Heaven - RNZ's podcast series on immigration
Statistics New Zealand population statistics manager Peter Dolan said most migrants arrived in the country on short-term work and student visas.
But it was how long they stayed in New Zealand, not their visa type, which affected whether they were counted as long-term migrants or short-term visitors.
"All people in New Zealand place demands on the country's services and infrastructure ... but it is those migrants who are here for a year or more that are included in estimates and projections of the resident population, and these are the basis for long-term planning," he said.
Arrivals numbered 132,100, which was also an annual record, and there were 59,700 departures.
The biggest increases were from the United Kingdom (up 2400) and South Africa (up 1600). The largest decrease in net migration in the July 2017 year was from India (down 3900 to 7400), due to a decrease in student migrant arrivals.
Of the 33,500 departures of New Zealand citizens in the July 2017 year, 62 percent were to Australia.
Compared with the year ended July 2016, net migration increased by 3400.
As well, a record number of tourists arrived for a break - with 3.7 million visitors over the year.
In July, 246,900 visitors arrived from overseas, setting a new record for the month - and 4 percent more than the same month the year before. Almost half were were people coming to New Zealand for holidays.