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”.

The Court of Appeal quashed a ministerial decision to extradite Kim Kyung-yup to China, saying to do so when there was a risk he would be tortured breached New Zealand’s international obligations.

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.

Kim’s lawyer Tony Ellis said the decision was a precedent-setting human rights victory.

“It is a judgement that has profound human rights importance which will resonate throughout the Common Law world, it is not just important in New Zealand,” he said in a statement.

Kim, a Korean national who has lived in New Zealand for 30 years, is accused of murdering 20-year-old Chinese woman Chen Peiyun while he was visiting Shanghai in 2009.

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.

While the three-judge appeal panel conceded “a cultural shift away from torture in the PRC [People’s Republic of China] is under way”, 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.”

Other issues identified by the judges included political influence on the criminal justice system and the harassment of defence lawyers.

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.