Customs has been forced to apologise after an officer was heard saying "no more Romanians" within earshot of a Romanian couple who were then kicked out of the country.
The couple say they are shocked by the discrimination at New Zealand's border.
"I just can't get over it. I was expecting a totally different welcome," said Veronica Lazarovici, who said she had hoped to undertake a graduate Diploma in Management Studies in Auckland.
But when she arrived at the airport, Ms Lazarovici and her husband, Madalin Vannatoru, were pulled aside.
She said it appeared they had been flagged on a computer system. And soon, they were put in interview rooms for hours of questioning.
Toward the start of the interviews, a Customs officer came into the immigration office and said, "No more Romanians".
"After 36 hours in transit I had been trying just to not fall asleep, but when that came I started crying instantly.
It was too much," Ms Lazarovici said.
The questioning continued for much of the day and felt like a criminal investigation, she said, and she eventually told her husband, "I don't think I want to be here".
"The officer looked so happy when she heard that."
The couple were refused entry and sent home.
A Customs spokeswoman confirmed a full investigation had found that the comment was made by an officer to a colleague.
The department had since apologised to Ms Lazarovici.
The comment had been "overheard and misconstrued", the spokeswoman said.
"The officer's comment was 'off-the-cuff' and made in a light-hearted manner, nonetheless it was inappropriate, and that it was made within earshot of members of the public is particularly regrettable."
The officer had been spoken to, and all frontline staff would get a reminder to act professionally at all times, she said.
Last month, a group of seven Romanians were barred from flying to New Zealand after Immigration's profiling.
The group were "likely to be part of a criminal gang" intending to commit crime in New Zealand, and it was an "excellent example of the important work" the agency did, said Immigration at the time.
But an Immigration spokesman said Ms Lazarovici's case, a few weeks later, had been unrelated to the earlier success, and the agency stood by its decision to refuse the couple entry.
"Ms Lazarovici did not present as a serious, committed student," the spokesman said. Immigration suspected the couple wanted to work in New Zealand illegally.
Ms Lazarovici baulked at the idea that she might have been suspected of illegal activities.
For about a month she had corresponded with NZMA, which is affiliated with Open Polytechnic, and AWI, which has Auckland-based programmes with the Nelson-Marlborough Institute of Technology.
They had both offered her places on their courses, but she had yet to enrol or pay the fees.
Immigration had advised her to "enter New Zealand on a visitor visa and apply for your student visa when you get here".
This correspondence was shown to Immigration at the border.
"And I thought it was a beautiful and friendly place. But now ... I was so dumb to consider going there to spend $17,000 and to be treated like that," she said.
"The consequence for holding Romanian passports: 10 hours of interrogation, part of my documents withheld by Immigration, sleep deprived for another 24 hours."