MANILA — The International Criminal Court said on Thursday that it was opening a preliminary investigation into accusations that President Rodrigo Duterte and other Philippine officials had committed crimes against humanity in the course of the government’s deadly crackdown on drugs.

Fatou Bensouda, a prosecutor for the international court, said in a statement that the inquiry would gauge whether there was enough evidence to build a case. She said she would be looking at events since July 1, 2016, “in the context of the ‘war on drugs’ campaign.”

“My office undertakes this work with full independence and impartiality,” Ms. Bensouda said. “As we do, we hope to count on the full engagement of the relevant national authorities in the Philippines.”

Harry Roque, a spokesman for the Philippine president, said that the government’s crackdown was a “legitimate police operation” and that the president welcomed The Hague-based tribunal’s decision.