MANILA — President Trump said on Monday that he had a “great relationship” with President Rodrigo Duterte of the Philippines, an authoritarian leader accused of carrying out a brutal campaign of extrajudicial killings in his nation’s war on drugs.

The two leaders declined to answer questions during brief remarks to reporters on the sidelines of an Association of Southeast Asian Nations, or Asean, summit meeting in Manila. But as they sat side by side, Mr. Trump and Mr. Duterte projected a friendly dynamic, ribbing the news media as they prepared to speak privately.

“We’ve had a great relationship,” Mr. Trump said. “This has been very successful.”

As journalists shouted questions about whether Mr. Trump would press Mr. Duterte on human rights, the Filipino president quickly silenced them.

“Whoa, whoa — this is not the press statement,” Mr. Duterte said. “We are in a bilateral meeting.”

“You are the spies,” he told the reporters, eliciting a hearty laugh from Mr. Trump before the press was led out of the room.

Later, Harry Roque, a spokesman for Mr. Duterte, elaborated on what the men discussed. “The issue of human rights did not arise,” he said. “It was not brought up.”

On the streets of Manila, meanwhile, a phalanx of about a hundred anti-riot police officers with shields and truncheons clashed Monday with about 300 protesters as they marched near the American Embassy.

The protesters carried anti-American placards and a likeness of Mr. Trump with a Hitler-like mustache. They were later pushed back with water cannons.

White House officials have said that Mr. Trump has a “warm rapport” with Mr. Duterte, with whom he has spoken and exchanged letters since taking office, and that he wants to mend the American-Filipino alliance after strains during the Obama administration.

Mr. Trump raised eyebrows in April by inviting Mr. Duterte to the White House during what American officials called a “very friendly conversation” on the phone in which the president praised the Filipino leader’s efforts to rid his country of drugs.

Mr. Duterte has been accused of ordering thousands of extrajudicial killings of drug suspects in what human rights groups condemn as a bloody campaign that has targeted many who may have nothing to do with narcotics.

Since taking office, Mr. Duterte has pivoted away from the United States, a longtime treaty ally, and toward China. The separation took on a more personal flavor before the Asean meeting in Laos last year, when Mr. Duterte referred to President Barack Obama as a “son of a whore” in response to a question about how he would react if Mr. Obama raised human rights concerns with him. The episode prompted Mr. Obama to cancel a formal meeting with Mr. Duterte at the summit meeting, though the two did talk informally.

Still, Mr. Duterte continued to distance himself, calling for a “separation” between the countries and threatening to scrap an agreement that allows American troops to visit the Philippines.

Trump administration officials have said Mr. Trump wants to improve relations with the Philippines as a bulwark against China’s expansionism in the South China Sea. The Philippines has clashed with China over disputed reefs and shoals in the waterway, which the two countries share, and Mr. Trump has used this month’s Asia tour to offer to, as he said on Sunday in Hanoi, “mediate or arbitrate” such disagreements.

But Mr. Duterte has played down the disputes this week, saying that China’s rapidly expanding economy has overtaken that of the United States and that a territorial confrontation would not be worthwhile.

“Today, China is the No. 1 economic powerhouse, and we have to be friends,” Mr. Duterte told Asean leaders on Sunday.

He said that while “the other hotheads” would like confrontation, “the South China Sea is better left untouched.”

“Nobody can afford to go to war,” Mr. Duterte added, including Russia, China, Britain and the United States.

On Sunday night, Mr. Duterte hosted a gala dinner celebrating the 50th anniversary of Asean. He and Mr. Trump were seated side by side at the dinner and were seen leaning in to chat animatedly at the start of the evening.