An elderly woman who became a refugee after years of attacks by her husband in China faced deportation from New Zealand because she needed residential care.
An appeals tribunal overturned her deportation, saying that as a refugee should could not legally be sent back to China.
Immigration NZ said the woman in her 70s had failed to meet health requirements to become a resident and became liable for deportation when her temporary visa expired.
The immigration and protection tribunal heard that because she had a stroke and required full-time care she was not entitled to a medical waiver to allow her to stay.
The Refugee Status Branch recognised her as a refugee in 2016, having heard how she suffered physical and psychological violence since they were married in the 1960s.
"She was afraid that her husband would seriously physically and emotionally harm her as he had done in the past, or even kill her, because she had separated from him and refused to return to China," the tribunal wrote of the RSB decision.
"[Her] husband was frequently verbally aggressive towards her and, on one occasion, tried to attack her with a hammer and an axe."
He broke their daughter's hand when she tried to intervene.
The woman, who twice tried to commit suicide, had to be protected by security when her husband attacked her in hospital following her stroke.
He had also persuaded her company to stop paying her pension, the tribunal heard. Her daughter and son-in-law could not convince the police to investigate and brought her to New Zealand, where they live.
The Refugee Status Branch cited country information showing that in China there was a broad societal belief that spousal abuse was acceptable and public security officials often ignored such violence.
The tribunal said refugees' applications for residence would usually be routine but hers had stalled because immigration health requirements sought to minimise public health care cost.
"Essentially, while recognised refugees are normally granted medical waivers if they need them, and therefore residence, the appellant's incapacity means that she requires full-time care which means in turn that she is not eligible to be granted a medical waiver.
"Her residence application was still outstanding when her work visa expired and she became unlawfully in New Zealand.
The tribunal decided that weighing the public health service cost against the country's obligations under the Refugee Convention, it wouldn't be against the public interest to have her remain in New Zealand permanently.
In any case, she was eligible for publicly funded care as a refugee, it said.
Her mobility and wellbeing had improved, but she still had nightmares about her estranged husband and their life in China.
"Her husband is an extremely violent man with powerful connections," it said. "When the Refugee Status Branch assessed whether there was an internal protection alternative available to the appellant in China, it noted that she was very frail, wheelchair-bound, and needed constant care."
Immigration NZ manager of operations support Michael Carle, said though the woman had become liable for deportation she had not been served with a deportation notice.
It was the responsibility of all clients, including refugees, to ensure they remained on valid visas, he said.
"Although she may not be deported from New Zealand, she became liable for deportation through operation of law when her temporary visa expired and she became unlawfully in New Zealand," he said.
"Any person who is recognised as a refugee by INZ's refugee status branch can apply for a residence visa to Immigration New Zealand.
"The applicant would still need to be assessed to determine that they were of good character and had an acceptable standard of health."
He said the Refugee Status Branch did not comment in respect of individual refugee and protection cases.