WASHINGTON — President Trump sent a powerful message to those who doubt his will to fight anti-Semitism — and to his own supporters in the white nationalist movement — during an annual Holocaust remembrance ceremony at the Capitol on Tuesday.

The president, who was slow to denounce campaign endorsements by racists including David Duke, made an unequivocal statement of support for Israel and pledged to “confront anti-Semitism” in a speech attended by lawmakers and survivors of Hitler’s war on European Jewry.

“We pledge — never again,” said Mr. Trump, invoking the phrase adopted by Jewish leaders after World War II. “We must never shrink away about telling the truth about evil in our time. We know that in the end, good will triumphs over evil.”

The president, who was with Israel’s ambassador to the United States, Ron Dermer — an American-born former Republican operative close to American conservatives — vowed to protect the Jewish people in the United States and abroad, and he criticized those who deny that the mechanized murder of six million Jews ever happened.