President Rodrigo Duterte — known for his deadly war against drugs — will step down as leader of the Philippines on Thursday, ending a six-year term.
The tough-talking leader's anti-drug campaign resulted in the deaths of thousands of alleged dealers and addicts. It drew global condemnation, amid accusations of police brutality.
That popularity took a hit when the coronavirus pandemic plunged the country into its worst economic crisis in decades, leaving thousands dead and millions jobless amid the slow distribution of vaccines.
And during his final year in office, judges of the International Criminal Court authorised a full investigation into possible crimes against humanity during Mr Duterte's anti-drug operations.
The president, who is being succeeded by the son and namesake of former dictator Ferdinand Marcos, was elected in 2016 on a promise to get rid of the Philippines' drug problem, openly ordering police to kill drug suspects if officers' lives were in danger.
He repeatedly said there was no official campaign to illegally kill addicts and dealers, but his speeches included incitements to violence.
"If you know of any addicts, go ahead and kill them yourself, as getting their parents to do it would be too painful," he said hours after being sworn in as president in June 2016.
Critics ended up facing lengthy jail terms, including opposition Senator Leila de Lima and journalist Maria Ressa, who was named as a Time magazine person of the year in 2018 for her work.
At least 6,248 people died in police anti-drug operations, official government figures show. But rights groups estimate tens of thousands have been slain by police and shadowy vigilantes, even without proof they were linked to drugs.
Violence has persisted on the restive southern island of Mindanao despite a 2014 peace deal with former rebels from the Moro Islamic Liberation Front.
Under Mr Duterte, efforts to decommission the MILF's 40,000 fighters and distribute economic aid have sputtered, raising fears that disillusioned Muslim youths could turn towards more hardline Islamist groups in the poor region.
In May 2017, hundreds of pro-ISIS foreign and local gunmen seized Marawi, the country's largest Muslim city.
But in what is seen by some analysts as Duterte's biggest achievement, he signed a law in 2018 granting greater autonomy to the region — the crucial missing element to the languishing peace pact.
Millions of people were lifted out of poverty in the first few years of Mr Duterte's term as economic reforms by his predecessor Benigno Aquino bore fruit.
The poverty rate fell from 23.5 per cent of the population in 2015 to 16.7 per cent in 2018, according to the Philippine Statistics Authority.
But as the pandemic choked the economy, the financial misery of the poor worsened.
The poverty rate shot back up to 23.7 per cent last year in the country of 110 million people.
In the first three months of 2022, 43 per cent of Filipino families reported feeling poor, while 34 per cent felt they were on the "borderline".
'Build, build, build' spending spree
Financed by taxpayer money and foreign loans, Mr Duterte went on a spending spree with a $147 billion to $165bn "build, build, build" campaign to improve the sorry state of the country's infrastructure.
Thousands of bridges, dykes, classrooms, evacuation centres and roads were built in a flurry of development.
The Department of Public Works and Highways (DPWH) said that in the first four years of Duterte's term, the government was able to "accomplish" 2.5 trillion pesos' worth of public infrastructure projects.
That compared with 820.4 billion pesos over the same number of years in the previous administration, it said.
But many key projects hit potholes.
Led by retired military generals instead of public health experts, the government's response to the coronavirus pandemic inflicted deep financial pain and upheaval.
Critics pointed to an initial shortage of doses and slow introduction of vaccines, while successive lockdowns and strict social distancing rules devastated businesses.
The economy plunged into its first recession in three decades, with millions left jobless.
By May 27, 2022, a total of 70.8 million people had been fully vaccinated and the economy was rebounding after the lifting of restrictions.
His rule was also marked by a swing away from the nation's former colonial master, the US, in favour of China.
"I simply love [Chinese President] Xi Jinping … he understands my problem and is willing to help, so I would say thank you China," he said in April 2018.
He set aside the rivalry with Beijing over the resource-rich South China Sea, opting to court Chinese business instead.
But billions of dollars of promised trade and investment from the country's superpower neighbour have been slow to materialise.
In July, he walked back a decision to end a key military deal with the US.
Mr Duterte failed to tackle some of the country's worst problems, including corruption, wrongdoing and impunity among local officials and police.
Three Philippine policemen were sentenced in 2018 to decades in prison for murdering a teenager during an anti-narcotics sweep, the first and only conviction so far against officers carrying out Mr Duterte's war on drugs.
He had said he was ready to go to jail over the clampdown, but vowed never to allow himself to come under ICC jurisdiction.
Mr Duterte said in May he would continue waging his drug war even after leaving office.
"I will go riding on a motorcycle and roam around … I'll search for drug peddlers, shoot them and kill them."
Agencies contributed to this report