For the first time, the Philippines is confronting a spate of suicide bombings, which have rocked the country's Muslim-majority southern provinces. They have come almost two years after the government liberated the city of Marawi from the Islamic extremist groups which had laid siege to it.
But instead of panicking and embracing more authoritarian measures, the authorities have to enhance existing counterterrorism measures and cooperate more with like-minded allies without undermining civil liberties and political rights.
Until last year, when the country recorded its first-ever suicide bombing incident, which killed 10, many presumed that the Philippines would be spared from the worst tactics ubiquitously employed by terrorist groups in the Middle East and North Africa because of a predominance of moderate Islamic values.
This year alone has seen at least three suicide bombing attacks on military and civilian targets. The deadliest one was when an Indonesian couple self-detonated inside a Catholic cathedral in Jolo during Sunday Mass, killing as many as 23 and injuring more than a hundred.
According to Philippine military officials, the notorious Abu Sayyaf Group, or ASG, an Islamic State-affiliated organization, was behind an attack on a military checkpoint earlier in September.
Mainstream Islamic theology condemns the act of suicide bombing, which indiscriminately targets civilians and takes the lives of their perpetrators, as forbidden and sinful. The vast majority of Filipino Muslims, or "Moros," have shunned more austere and ultraconservative interpretations of Islam prevalent in places such as the Arabian Peninsula.
Even so, the southern Philippines has been a hotbed of Islamic extremist for decades, while defense officials and security experts have complacently argued that the more moderate brand of Islam there had checked the worst impulses of extremist organizations.
As early as the 1980s, transnational terrorist groups such as al-Qaida and the Indonesian-based Jemaah Islamiyah built links with the southern Philippines and even established training camps there.
Throughout the 1990s and 2000s, the ASG and other extremist groups conducted several terrorist attacks in major cities across the country, including in Christian-majority Metro-Manila.
None of those recorded terrorist attacks employed suicide bombings, but rather remote-controlled explosives.
The rise of the Islamic State, however, has radicalized the jihadist movement in the Philippines, pushing regional affiliates to adopt violent tactics to advocate their ideology.
In 2017, IS-affiliated groups in the Philippines joined forces in a daring siege on Marawi, the country's largest Muslim-majority city. After five months of intense battles, the Philippine military were able to liberate the city.
The following year Filipino jihadists shifted to even more extreme measures, including the deployment of both male and female suicide bombers. This has forced the Philippine government to reconsider its counterterrorism strategy to confront this new tactic.
In response to the IS threat, the Philippine government has imposed martial law across the entire island of Mindanao, including in Christian-majority provinces where there is minimal jihadist footprint.
Moreover, the government is also contemplating new counterterrorism legislation which will give security agencies greater leeway to track, preempt and arrest suspected terrorists, including through more flexible rules on wiretapping and extended detention.
But indefinitely extending the yearslong martial law in Mindanao, which has led to the suppression of civil liberties and political rights, will only exacerbate grassroots grievances and a sense of insecurity on the ground.
Meanwhile, passing draconian counterterror legislation without sufficient safeguards will empower abusive security officials who are intent on circumventing due process for short-term gains.
The Philippine government should instead focus on more effective intelligence-gathering and streamlined interagency coordination, especially between the military and law enforcement units.
It should also increase sustained cooperation with traditional allies such as the U.S. and regional partners like Singapore, Indonesia and Malaysia, which have been grappling with similar threats in recent years.
Together with Malaysia and Indonesia, the Philippines should more effectively guard its porous maritime borders, which have served as a conduit for transnational terrorist groups conducting deadly operations in Mindanao. Almost all the suicide bombers on Philippine soil so far were foreigners who had been smuggled into the country.
Moreover, the Philippine government should, in cooperation with local Muslim officials, expedite the reconstruction and rehabilitation of Marawi, which remains heavily devastated almost two years since its liberation from IS-affiliated elements.
As Philippine Defense Secretary Delfin Lorenzana has told me, "there is frustration" among the residents, who "want to rebuild their houses, but nothing is happening," because the government is still clearing explosives from certain areas after repeated delays.
Conversations with community leaders suggest that jihadists will be able to tap into growing frustration and radicalization among Marawi youth if the government fails to provide swift reconstruction.
The Philippines needs sustained engagement with the communities on the ground, reconstruction of Marawi and inclusive development across Muslim provinces, as well as effective and methodical counterterrorism measures together with allies and regional partners, to combat terrorism.
The best solution to the threat of terrorism is not through a whiplash authoritarian response.
Richard Heydarian is an Asia-based academic, columnist and author of "The Rise of Duterte: A Populist Revolt Against Elite Democracy" and the forthcoming "The Indo-Pacific: Trump, China and the New Struggle for Global Mastery."