The Court of Appeal has ruled the Immigration Service can send the Chinese mother of a New Zealand-born child back to China.
The decision follows a lengthy battle with the Immigration Service which began when Xiao Huang's visitor's permit ran out in 2001.
Xiao Huang was fearful of returning to China while she was pregnant because she had already been required to have two abortions to comply with that country's one-child policy.
Her visitor's permit was extended to allow her to stay in New Zealand until her child was born but once that occurred she appealed against a removal order issued by immigration authorities.
The Court of Appeal ruled on Friday that while the authorities must take the best interests of the child as a primary consideration, that does not mean a country loses its right to control its borders.
The court found all the proper processes had been followed and upheld a High Court ruling allowing Ms Huang to be removed from New Zealand.
However it has allowed her 20 days to appeal to the Supreme Court against its decision.