The U.N. Human Rights Council voted on Thursday to set up an investigation into mass killings during Philippine President Rodrigo Duterte’s so-called war on drugs, a step that activists said was long overdue.

Duterte’s government says police have killed about 6,600 people in shootouts with suspected drug dealers since he was elected in 2016 on a platform of crushing crime. Activists say the toll is at least 27,000.

The first-ever resolution on the Philippines, led by Iceland, was adopted by a vote of 18 countries in favor and 14 against, including China, and 15 abstentions, including Japan.

“This is not just a step towards paying justice for the thousands of families of victims of extrajudicial killings in the Philippines, but it is also a message that we collectively send out to those who have praised President Duterte,” said Ellecer “Budit” Carlos of the Manila-based rights group iDefend.

“This war on drugs, as we have repeatedly said, it’s a sham war,” he told a news briefing in Geneva.

Philippine activists say tens of thousands are being killed as police terrorize poor communities, using cursory drug “watch lists” to identify suspected users or dealers, and executing many in the guise of sting operations.

Police deny that, saying all their killings were in self-defence.

Myca Ulpina, a 3-year-old killed on June 29 near Manila, was among the latest and youngest known victims. Police say her father, Renato, had used his daughter as a human shield.

Duterte’s spokesman, Salvador Panelo, questioned the validity of a resolution not backed by the majority of council members, saying Filipinos overwhelmingly backed the president’s unique leadership and approach.

“The resolution is grotesquely one-sided, outrageously narrow, and maliciously partisan,” Panelo said in a lengthy statement issued overnight.

“It reeks of nauseating politics completely devoid of respect for the sovereignty of our country, even as it is bereft of the gruesome realities of the drug menace.”

The delegation from the Philippines, which is among the council’s 47 members, had lobbied hard against the resolution, which asks national authorities to prevent extrajudicial killings and cooperate with U.N. human rights boss Michelle Bachelet, who is to report her findings in June 2020.

Philippines Ambassador Evan Garcia said the Duterte administration was committed to upholding justice, adding, “We will not tolerate any form of disrespect or acts of bad faith. There will be consequences, far-reaching consequences.”

Laila Matar of New York-based Human Rights Watch criticized his comments.

“It was quite clear that they threatened consequences for those who had supported the resolution, which in turn makes us concerned for the many human rights defenders, civil society activists and journalists on the ground,” she told the briefing.

Duterte, asked by reporters in Manila whether he would allow U.N. rights officials access to investigate, said, “Let them state their purpose and I will review it.”

If Duterte permitted the investigation and it proceeded impartially, Panelo said, “We are certain its result will only lead to the humiliation of the investigators, as well as of Iceland and the 17 other nations.”