Police in battle gear were mustered to keep order as protesters held a series of rallies across the capital of Manila.
Police in battle gear were mustered to keep order as protesters held a series of rallies across the capital of Manila, using the 45th anniversary of late dictator Ferdinand Marcos imposing martial law to warn that Duterte was equally violent and authoritarian.
"Our country is turning into a graveyard. People are getting killed everyday and we bury the dead everyday, just like in the time of Marcos," anti-Duterte protest leader Pedro Gonzales told AFP.
But supporters of Duterte also turned up in large numbers, reflecting his popularity with many Filipinos who see him as a charismatic, anti-establishment politician who is their best chance to quell crime and corruption.
Duterte vowed in last year's election campaign to eradicate illegal drugs in society by killing up to 100,000 traffickers and addicts.
Since he assumed office 15 months ago police have reported killing more than 3,800 people in anti-drug operations.
The crackdown has triggered wider violence with thousands of other people being murdered in unexplained circumstances that rights groups partly attribute to vigilante death squads.
Gonzales led about 300 people to the gate of the Philippine military headquarters.
Hoisting "No to Martial Law" and "Stop the Killings" banners, they burnt a poster bearing a composite picture of Duterte and Marcos, and captioned "Fascist", as about 70 unarmed policemen blocked their way.
Police said thousands of anti-Duterte protesters as well as his supporters later gathered outside Malacanang presidential palace.
The anti-Duterte crowd burned a "Rody's Cube", wooden block art styled after the Rubik's Cube 3-D puzzle with the interchangeable faces of Marcos and Duterte.
The protesters were backed by the political opposition and leaders of the Catholic Church, the Asian country's dominant religion, signalling a rising opposition to Duterte.
Vice President Leni Robredo and Duterte's predecessor, Benigno Aquino, both critics of the incumbent leader, attended a separate mass for the drug war dead Thursday.
"The good part of this is there are so many people concerned, from different ages," Aquino told reporters.
Archbishop Socrates Villegas, president of the Catholic Bishops Conference of the Philippines, denounced the drug killings at another mass Thursday, saying Catholics must "do more" than lighting candles for the dead and helping orphans.
"Stand up. To keep quiet in the face of evil is a sin," he said.
Manila police said about 5,000 people took part in the anti-Duterte protest near the palace, where about 3,000 supporters of the president also gathered nearby.
A pro-Duterte rally attended by 12,000 people was held in front of a Catholic church just over a kilometre (0.6-mile) away, police added.