After an eight-year battle, an Auckland man wanted for murder in China has been spared extradition.
China wanted Kyung Yup Kim to stand trial in Shanghai over the 2009 death of Peiyun Chen, a woman aged 20.
Former Justice Minister Amy Adams twice approved extradition, after China gave assurances Kim would not be executed.
But in a victory on Tuesday for Kim and for his lawyer Tony Ellis, that extradition decision has been quashed and must now be reconsidered.
Kim was detained for more than five years as extradition proceedings dragged on, before he was released on electronic bail.
Kim said he could also be at risk of torture or extra-judicial killing in China.
Ellis has spent nearly a decade on the case. He argued New Zealand could not trust Chinese assurances about Kim and he raised concerns about the use of torture in China.
Ellis said China claimed to have 35 witnesses.
But he told Stuff he was never allowed to cross-examine these people.
The human rights lawyer said the new judgment would "resonate through the Common Law world".
Ellis said the new Minister of Justice, Andrew Little, would have a difficult, if not impossible task answering the "profound and important" questions the appeal court judgment raised.
It will be for Little, who is currently travelling overseas, to consider the judgment and any next steps including a possible appeal.
Ellis said he was "over the moon" about the judgment, which he called a significant victory for human rights.
The new judgment said Chinese police had "forensic and circumstantial evidence linking Mr Kim to the homicide" but Ellis said that evidence had not been tested.
Ellis said when told Chinese police wanted to question Kim, he had proposed: "Why don't they interview him here?"
He said Kim would have been tortured and had no lawyer present for any interview in China.
Kim, a father of two, is a South Korean citizen and New Zealand resident.
The Court of Appeal said Adams decided to surrender Kim in 2015.
"She concluded that Mr Kim was at risk of torture if surrendered but that assurances provided by the PRC which allowed extensive monitoring of Mr Kim's treatment adequately addressed this risk."
According to the new judgment, Kim argued Adams failed to grasp how pre-trial torture and "endemic" extra-judicial execution featured in China's legal system.
In reply to a request for comment from Adams, a National Party spokesperson said: "These cases are very difficult and involve serious and considered deliberation.
"The then-Minister made what we believe were the right decisions. It is now a matter for this Government to consider."