When Washington Post correspondent Keith Richburg paid a call on Davao City police chief Franco Calida in 1987, he found himself following a trail of blood up the wooden stairs to the Philippine Constabulary colonel’s second floor office.

There, piled up like cordwood outside the office door were the bodies of suspected members of the New People’s Army (NPA) – the armed wing of the Communist Party of the Philippines – who had been killed the night before by a rag-tag vigilante force known as Alsa Masa, formed to end a communist campaign of terror unleashed on the Philippines’ third largest city.

Why Duterte’s leaving behind his jet ski on his trip to China

Two years later, as a correspondent for the Far Eastern Economic Review, I could still make out the stains as I climbed those same stairs to interview Calida about the remarkable success of the Alsa Masa death squads in loosening the NPA’s dangerous grip on Davao and its sprawling suburbs.

The city’s mayor then was Rodrigo Duterte, now the hugely controversial president of the Philippines, who appears to be following the same brutal playbook in his obsessive campaign to wipe out the country’s drug trade – with Calida’s younger brother, Jose, as his solicitor-general.

Not that extrajudicial killings are new to the Philippines. Easily the most chilling interview I ever did was with Rolando Abadilla, President Ferdinand Marcos’ chief enforcer, whose name will forever be linked to “salvaging” – the word used to describe the murders of leftists and other political rivals during that period.

Duterte embraced the Alsa Masa when he became mayor in early 1988, but looking back now it seems a strange paradox for a leader who proudly calls himself a socialist and has long links to the Communist Party of the Philippines (CPP).

Indeed, it is this which makes him very different from the oligarchs and the old elite, who for all of the country’s democratic trappings continue to perpetuate an age-old Latino-style feudal system locked in place by paternalism and generations of largesse.

It is also his background as a student activist during Marcos’ rule, which explains the strength of his anti-US rhetoric, calling President Barrack Obama a “son of a whore” and threatening to downgrade Manila’s previously close relations with Washington.

Watch: Duterte goes big on his state visit to China

For the president of a country that has always idolised the US, that alone must have guaranteed him a warm welcome on his state visit to Beijing on Tuesday, with Chinese officials saying it will “help increase political mutual trust and strengthen pragmatic cooperation”.

But while Duterte still has a 70 per cent approval rating in the polls, mostly because of his draconian law-and-order policy, Filipinos are not nearly as comfortable with the way he appears to be alienating the country’s former colonial master – or his perceived swing to the left.

Americans in Philippines are jittery as China-bound Duterte rails against United States

Only recently, business leaders called on Duterte to remove so-called “communists” from his administration, claiming they were more fixated on spreading their ideology than doing their jobs. It is believed they were alluding to Labour Secretary Silvestre Bello III and his undersecretary, former militant labour leader Joel Maglunsod, both of whom have pushed for a 125 peso hike in the minimum wage.

The president appointed two CPP nominees, university professor Judy Taguiwalo and leftist politician Rafael Mariano, as respective secretaries of social welfare and reform as part of his efforts to draw the CPP into the ongoing Oslo peace talks to end the 47-year-old communist rebellion in the Philippines.

The two 100-strong delegations have made little progress since they began talking in August, with the CPP’s National Democratic Front (NDF) insisting on agrarian reform, national industralisation and strengthened labour rights, among other demands, as the basis for a settlement.

Playing the US against China may prove a smart move for Rodrigo Duterte

The son of a provincial governor, Duterte grew up with strong nationalistic sentiments which became more pronounced during his university years when he studied political science under Jose Maria Sison, 77, the CPP’s founder who has lived in the Netherlands since 1986 and calls the president his friend.

Former classmates recall that he strongly opposed speaking English in class, advocating instead the use of Tagalog and local dialects to underline his nationalist credentials.

As a newly minted lawyer, Duterte was not a member of the CPP or the NDF, but he was known to arrange meetings between foreign journalists and communist leaders in the early 1980s when the CPP was in full flower.

By the time he was elected mayor of Davao city in early 1988, roving bands of Alsa Masa vigilantes, mostly criminals and NPA turn-coats, had already racked up a heavy death toll of suspected NPA operatives, claiming to have killed 104 in March 1987 alone.

All of a sudden, Filipinos matter

Duterte’s motives in supporting and funding the Alsa Masa may have been very different from Calida’s. Former NDF supporters believe he may have actually been supporting the CPP central committee in its purge of urban revolutionaries who had deviated from the party’s Maoist line.

Law and order was always a Duterte priority, however, so it may have been no coincidence that when he was reappointed mayor in 2001 – after a two-year stint in Congress – the now-moribund Alsa Masa was replaced by the Davao Death Squad (DDS).

In the years that followed, the DDS was implicated in 1,400 vigilante-style executions of mostly petty criminals. The resultant improvement in public security led to stronger economic growth, which in turn increased Duterte’s popularity.

The then-mayor never appears to have held the US in high regard, but what only fuelled those sentiments was an incident in May 2002 when the US embassy allegedly helped in the escape of an American responsible for a mysterious explosion in a Davao hotel room.

While the Obama administration has sharply criticised Duterte’s latest killing spree, as have the United Nations and other Western governments, it has wisely avoided being drawn into a more damaging slanging match. But it can hardly have been happy to see the CPP now praising Duterte for his anti-US rhetoric, saying “the situation now exists for the forging of a patriotic alliance between his anti-US regime and the revolutionary and patriotic forces”.

John McBeth is a former Far Eastern Economic Review correspondent and author of Reporter: Forty Years Covering Asia