The human rights body of the United Nations has agreed to begin investigating President Rodrigo Duterte’s violent war on drugs in the Philippines amid accusations of extrajudicial killings, enforced disappearances and crimes against humanity.

A resolution adopted by the UN Human Rights council on Thursday, which passed narrowly by four votes, authorised the United Nations human rights chief, Michelle Bachelet, to examine evidence of thousands of deaths at the hands of the police and so called “death squads”. She will present her report in a year.

The official death toll from Duterte’s war on drugs, which has been the signature policy of his presidency since he was elected in 2016, currently stands at around 5,300. However, human rights group estimate the real figure is between 12,000 and 20,000, mostly targeting the urban poor.

While the resolution did not establish a full commission of enquiry, as many activists had hoped it would, the green light for Bachelet to begin investigations is the council’s strongest condemnation of Duterte’s actions yet and could have severe consequences. Amnesty International hailed the vote as “crucial”.

Bachelet’s spokeswoman, Ravina Shamdasani, said the report would offer an opportunity to “get clarity around the contested facts, figures and circumstances” of the drug war.

At the UN headquarters in Geneva, Philippine delegates had lobbied furiously over the past week to try and prevent the resolution being passed and vehemently spoke out against its adoption on Thursday.

“The Philippines rejects this resolution,” said foreign secretary Teodoro Locsin Jr. “It cannot, in good conscience, abide by it. We will not accept a politically partisan and one-sided resolution so detached from the truth on the ground.”

Locsin added that in light of this resolution, which was backed by several countries the Philippines considers allies including the UK and Australia, the foreign policy of the Philippines had shifted from “friend to all, enemy to none” to “friend to friends, enemy to enemies, and a worse enemy to false friends.”

“We will not tolerate any form of disrespect or acts of bad faith. There will be consequences, far-reaching ones,” said Locsin.

The vote came against the backdrop of renewed international scrutiny of Duterte’s war on drugs, which three years on has remained as violent as ever. Some 490 deaths have been recorded in 2019.

In June, a three-year-old girl became the youngest victim of the war on drugs after she was shot in the head during a drugs raid on her home. The response to her death by the former police chief, Senator Ronald dela Rosa, who said simply that “shit happens”, drew condemnation from international human rights groups.

This week Amnesty also released a report alleging that Duterte is carrying out a “large-scale murdering enterprise” and should be investigated by the UN for crimes against humanity. The International Criminal Court (ICC) is also carrying out its own preliminary investigation into whether the war on drugs in the Philippines constitutes crimes against humanity.