When Mr. Duterte likened himself to Hitler, his supporters rushed to defend him on social media, arguing that the comment was precipitated by a remark by former President Benigno S. Aquino III, who compared Mr. Duterte to Hitler five months earlier.

The argument aligned with ones made the same day by administration officials. “It is a matter of record that the reference to Hitler did not originate from the president,” his spokesman Ernesto Abella said in a statement.

A pro-Duterte site went further, posting photographs of two Reuters journalists it accused of causing the furor by misrepresenting Mr. Duterte’s words, and calling for their punishment. The post was shared thousands of times on social media and whipped up an untold number of commenters, who created a flurry of threats and insults. Mocha Uson, a blogger with 4.2 million followers on Facebook, shared the images, adding the caption in Tagalog, “Enemies of change.”

Critics of Mr. Duterte have been threatened with rape and a variety of deaths, including by hanging, drowning and, as one pro-Duterte doctor suggested to Emily Rauhala, who has written about the Philippines for The Washington Post, that she crawl back into her mother’s uterus and suffocate.

Mr. Andanar said that the administration did not condone threats of violence on social media. So far, none has been carried out.

However, he said, “I cannot blame the Duterte social media patriots when they protect the president and when they do everything that they can to pounce on the enemy.”