During his second State of the Nation Address, Philippine President Rodrigo Duterte promised to continue his "unrelenting and unremitting" campaign against illegal drugs, which has reportedly claimed the lives of thousands of suspected drug dealers. True to form, he also lashed out at critics, particularly those in the European Union and the United States, for questioning the wisdom of his signature policy.

Human rights groups around the world have condemned Duterte’s controversial war on drugs, which has also embittered the Philippines’ historically warm ties with the West. Yet, the tough-talking Duterte has progressively solicited the assistance of Western partners, particularly that of Washington and Canberra, against the burgeoning threat of the so-called Islamic State (IS) on his home island of Mindanao.

For the past three months, IS-affiliated groups have managed to lay siege on Marawi, the Philippines’ largest Muslim-majority city, providing a blueprint for Jihadist-extremist groups around the region. The prospect of an IS Wilayat (governorate) — otherwise known as a "distant caliphate" — in Southeast Asia has gained greater pungency than ever before.

As a result, both the United States and Australia face the classic dilemma of cooperating with unsavory allies in order to stem a greater threat. Under Duterte’s watch, the Philippines is confronting the twin threat of terror and anarchy, with a potentially disastrous impact on its fragile, fledgling democracy.

Throughout the first half of 2017, Duterte was forced to recalibrate his bloody crackdown on suspected drug dealers. This was largely due to the suspected murders of provincial mayor Rolando Espinosa and South Korean businessman Jee Ick-joo by members of the Philippine National Police.

Their deaths provoked widespread condemnation from the business community as well as some of Duterte’s key allies in the Senate, who launched a series of high-profile investigations that exposed the innermost flaws of Philippine law enforcement agencies. No less than South Korean President Moon Jae-in, then as opposition leader, weighed in, expressing outrage at how "the murder was committed within the police headquarters" and accusing Duterte of committing "diplomatic disrespect" for not sacking responsible officials.

In response, Duterte made a rare statement of apology, stating how he was "very sorry that it had to happen" and reassuring Seoul that "those responsible are known to us already and they will go to prison and I will see to it that they will be sentenced to the maximum". He temporarily suspended police operations and even suggested using the (presumably more reliable) military for anti-drug operations instead. Over the succeeding months, the Filipino leader focused on international diplomacy, infrastructure development and counter-terrorism in Mindanao.

But in recent weeks there has been another sudden spike in drug-related killings at the hands of law enforcement agencies. In early August, anti-drug raids claimed the lives of 91 suspected drug users in Manila and the neighboring region of Bulacan alone. Just days earlier, another raid led to the gruesome death of 14 individuals in Ozamiz, including the mayor Reynaldo "Aldong" Parojinog and his wife Susan. The President was visibly pleased, describing the spate of killings as "beautiful".

But the suspected murder of a teenager Kian Loyd delos Santos by police officers, which was caught on a nearby CCTV camera, provoked nationwide outrage. In response, a subdued Duterte expressed profound regret and (once again) promised to hold erring law enforcers accountable. He also met the family of the slain teenager to mollify public outrage.

Despite this, it is unlikely that Duterte will shift gears in his war on drugs, which enjoys the support of most of the population. He will likely focus more on high-value targets and make cosmetic reforms to avoid heart-wrenching casualties — especially among minors. Meanwhile, he can count on continued external support amid the ongoing campaign against IS elements in Mindanao.

In fact, diplomatic ties seem to be warming up. A confident Duterte has claimed that in recent months he has rarely discussed human rights concerns with Western leaders, including Australian Foreign Minister Julie Bishop. According to the Filipino President, the White House even supports his anti-drug campaign.

In early August, Duterte held an unusually affable meeting with U.S. Secretary of State Rex Tillerson, who barely touched on human rights issues and instead focused on expanding counter-terrorism cooperation. Weeks later, the Philippine government publicized a "highly unusual" and controversial photo showing the Filipino President and the highly reclusive Australian spy chief Nick Warner posing with a signature "Duterte fist".

Both Washington, as a treaty ally, and Canberra, which has a Status of Forces Agreement with Manila, have pledged or already deployed troops, intelligence, weapons, and surveillance equipment to Duterte’s counter-terror efforts. The Pentagon is even considering direct military involvement in the anti-IS operations in Mindanao.

Once again, Western capitals have found themselves in a tough bind, shedding deepening concerns over human rights issues in exchange for counter-terror cooperation with neo-authoritarian leaders. The ultimate victim is no less than Philippine democracy, where erratic and centralized leadership is undermining the rule of law.

The News Lens has been authorized to republish this article from East Asia Forum. East Asia Forum is a platform for analysis and research on politics, economics, business, law, security, international relations and society relevant to public policy, centered on the Asia Pacific region.