An order to extradite a New Zealand resident to China has been quashed because of human rights concerns.
A New Zealand court stopped a murder suspect being extradited to China on Tuesday, saying it could not send a suspect to a country where torture was "widespread" and "systemic".
Kyung Yup Kim had faced two orders to be extradited to China.
Former Justice Minister, Amy Adams, had approved the orders after reassurances the Korean-born New Zealand resident would not face the death penalty.
But, the Court of Appeal ruled on Tuesday the decision should be reassessed because of the risk the father of two could be tortured in China.
New Zealand's government could still appeal the decision to the country's highest court.
The 99-page judgement, which included a damning assessment of Beijing's justice system, comes amid huge protests by Hong Kong residents against laws allowing extraditions to mainland China.
Mr Ellis said the decision was a precedent-setting human rights victory.
Kim, a Korean national who has lived in New Zealand for 30 years, is accused of murdering 20-year-old Chinese woman Pei Yun Chen while he was visiting Shanghai in 2009.
He denies all charges.
Kim was arrested in New Zealand in 2011 and Beijing asked for his extradition after giving assurances that he would not face the death penalty if convicted.
After a lengthy legal process that included two ministerial reviews, New Zealand in 2015 decided to extradite him - the first time it had agreed to a suspect being sent to face trial in a Chinese court.
But Tuesday's 99-page court ruling halted that process and ordered a third ministerial review while raising questions about the Chinese legal system.
Appeal Court Judge Helen Winkelmann said China's criminal justice system was different from New Zealand, and it is a country in which, it is reliably reported, torture remains widespread.
"New Zealand has obligations under international law to refuse to return a person to a jurisdiction in which they will be at substantial risk of torture, or where they will not receive a fair trial," Ms Winkelmann said in a written judgment.
The office of New Zealand's justice minister, the Chinese embassy in Wellington and China's Foreign Ministry did not immediately respond to request for comment.
New Zealand first agreed in 2015 to extradite Kim to Shanghai after the body of a 20-year-old woman, who had been strangled, was found in a Shanghai field in 2009.
Kim has denied the murder accusation, according to court documents.
Kim's lawyer Tony Ellis told Reuters by telephone that it was a "happy day" for his client who is being electronically monitored while on bail in Auckland.
"It is a judgment that has profound human rights importance that will resonate throughout the common law world," he said.
While the three-judge appeal panel conceded "a cultural shift away from torture in the PRC (People's Republic of China) is underway", it gave little weight to Chinese assurances Kim would receive a fair trial.
"Torture remains widespread and confessions obtained through torture are regularly admitted in evidence," the judgement said.
"It logically follows, we consider, that there are inadequate systems in the PRC to prevent torture."
It added: "Torture is illegal yet remains widespread because of cultural and systemic features of the PRC criminal justice system."
China's first extradition request to New Zealand comes as it is trying to drum up international support for returning corruption suspects who have gone abroad and as protests rock Hong Kong over its legislature's plan to amend laws allowing suspects to be extradited to mainland China.
Many Western countries have been reluctant to sign extradition treaties with China, pointing to its poor rights record and opaque criminal prosecution process.
Kim spent five years in jail after his arrest and is currently on bail in Auckland.
His case will now go back to Justice Minister Andrew Little for review, although Kim's lawyer Ellis argued there was little chance of extradition given the "profound and important" questions posed by the Court of Appeal judgement.