How Rodrigo Duterte had to cut down on tough talk and quietly accept US military help against ISIL.

“[R]eality has a way of catching up,” warned former US President Barack Obama during his emotionally charged farewell speech. It was partly an admission of his own shortcomings, but also a subtle, yet poignant, word of caution to populist leaders seeking overnight national transformation based on simplistic slogans and tough-talk alone. Obviously, Obama had no less than his successor, Donald Trump, in mind.

In many ways, political reality is also catching up with other strident populist leaders around the world. A year into office, the Philippine’s tough-talking president, Rodrigo Duterte, is confronting a full-blown crisis in his home island of Mindanao, which is testing his mettle of leadership like never before.

For almost a month, the Philippine military has struggled to liberate Marawi, the country’s largest Muslim-majority city, from ISIL-affiliated fighters, led by the notorious Maute Group. Utilising improvised explosive devices (IEDs), a sophisticated network of underground tunnels, and deploying snipers in strategic locations across the city, few hundred radical jihadists managed to hold onto several neighbourhoods despite large-scale mobilisation of government troops.

Eager to deny the Maute Group a single inch of territory, the government resorted to expansive air raids, which led to friendly fire deaths and growing concerns over civilian casualties. The bloody siege of Marawi has claimed the lives of close to 400 people, including civilians. After days of continuous bombing and heavy clashes, much of Marawi has been reduced to rubbles, eerily resembling scenes of devastation in Aleppo and Mosul.

As the Philippine military struggled with a full-fledged urban warfare, the Duterte administration was forced to seek US military assistance. In many ways, this was a dramatic volte-face for a country, whose leader has repeatedly insulted US officials and threatened to expel US forces from his country in pursuit of an “independent” foreign policy.

Uncle Sam is back

Aside from dispatching state-of-the-art drones for real-time intelligence support, the Pentagon also provided a cache of M134D Gatling-style machine guns, M203 grenade launchers, M4 carbines, and Glock 21 pistols to the Philippine military. Washington also deployed a special forces unit to provide training and technical assistance to Filipino troops in Marawi.

As Admiral Harry Harris, commander of the US Pacific Command, told me on the sidelines of the Shangri-La Dialogue in Singapore earlier this month, “We are involved in activities in Mindanao to help the Armed Forces of the Philippines take the fight to ISIS in the Philippines”.

OPINION: Mindanao crisis – A city on fire

Ironically, the siege of Marawi, and the Philippines’ growing reliance on American counterterrorism assistance, came right after Duterte’s back-to-back visits to Beijing and Moscow. Duterte is yet to agree to visit the White House, despite Donald Trump’s open invitation earlier this year.

Though he is the country’s commander-in-chief, Duterte implied that the Philippine military unilaterally made the decision to seek US military backup without his approval. As he half-jokingly lamented, “This is really their sentiment, our soldiers are really pro-American, that I cannot deny”.

Washington, unlike Duterte's preferred strategic partners Moscow and Beijing, enjoys a long history of interoperability and mutual trust with the Philippine military.

A more nuanced analysis, however, suggests that the Filipino president has, albeit reluctantly, been open to counterterrorism cooperation with the US. After all, both countries are deeply concerned about the prospect of an Islamic State of Iraq and the Levant (ISIL, also known as ISIS) wilayat (province) forming in Mindanao, especially as foreign fighters from as far as the Russian Caucasus and the Middle East have joined the fray.

Staring into the abyss

Weeks before the siege of Marawi, Duterte, in a speech commemorating Philippine-US military alliance during World War II, underscored the importance of continued cooperation against “the menace of terrorism, violent extremism and transnational crimes” in order to “defend the common good”.

Washington, unlike Duterte’s preferred strategic partners Moscow and Beijing, enjoys a long history of interoperability and mutual trust with the Philippine military. Thanks to a package of security agreements, namely the Visiting Forces Agreement and Enhanced Defense Cooperation Agreement, the Pentagon also enjoys extensive access to Philippine military bases.

The Philippines is yet to sign any comparable arrangement with China or Russia. Counterterrorism operations, however, aren’t Duterte’s greatest challenge. Post-conflict reconstruction and reviving peace negotiations between the government and major rebel groups is obviously the bigger concern down the road.

READ MORE: The battle for Marawi – Confusion and contradictions

“I hope in the soonest time, you will find a new heart to forgive my soldiers, the government,” beseeched a visibly distraught Duterte, who sought more patience and understanding from the residents of Marawi, most of whom have been stuck in refugee camps with no clear future in sight.

The Filipino president allocated 20 billion Philippine pesos ($400m) for reconstruction efforts, vowing to make the city “beautiful again“. During his presidential campaign, Duterte presented himself as the voice of Muslim Filipinos. Throughout his first year in office, he, however, devoted much of his political capital to a heavy-handed crackdown on illegal drugs, while painfully reorienting Philippine foreign policy away from the US in favour of Eastern powers.

To be fair, Duterte inherited an overwhelming set of challenges from his predecessors, who bungled various opportunities to bring about peace and development to Mindanao. Now, as he grapples with a new contagion of terror and violence in his home island, the Filipino president needs to get all the help he can, including from the West, in order to fulfil his election promise to leave behind “a Mindanao that is governed in peace”.

Richard Javad Heydarian is a specialist in Asian geopolitical/economic affairs and author of Asia’s New Battlefield: The USA, China, and the Struggle for the Western Pacific.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial policy.