Prime Minister Benjamin Netanyahu of Israel on Sunday rejected international pressure to rein in its military campaign in Gaza and, speaking at a Holocaust memorial, asserted Israel’s right to fight its “genocidal enemies.”

Nearly seven months into the war, Mr. Netanyahu has been steadfast in his goal of destroying Hamas. This, and Mr. Netanyahu’s insistence on sending troops into Rafah, the southernmost city in the Gaza Strip, has complicated efforts to end the fighting and raised concerns about the future of the hostages held by Hamas.

But Mr. Netanyahu has remained defiant.

On Sunday, he spoke at Yad Vashem, Israel’s Holocaust memorial in Jerusalem, to mark the national Holocaust remembrance day. Hamas’s Oct. 7 attack, he said, was not a “Holocaust” — not because Hamas did not have the intention to destroy Israel but because of its inability to do so. About 1,200 people were killed and more than 200 were taken hostage that day, Israeli authorities say. Hamas’s intention, Mr. Netanyahu said, was the same as that of the Nazis.

In his speech, which lasted for about 15 minutes and was largely in Hebrew, Mr. Netanyahu rejected accusations that Israel was committing genocide in the Gaza Strip. Since the beginning of the war, Gazan authorities say Israeli troops have killed more than 34,000 people, many of them women and children, though the statistics do not differentiate between civilians and combatants.

Mr. Netanyahu said that Israel’s military does everything it can to avoid harming civilians and that it has allowed aid to flow through to Gaza to avoid a humanitarian crisis. A United Nations official recently said that parts of Gaza are experiencing “full-blown famine.”

Mr. Netanyahu made a point to say a few words in English that were aimed at the international community. He invoked the Holocaust in asserting Israel’s right to defend itself, with or without international support.

“If Israel is forced to stand alone, Israel will stand alone,” he said. “But we know we are not alone because countless decent people around the world support our just cause. And I say to you, we will defeat our genocidal enemies. Never again is now!”

On Monday morning after his speech, the Israeli military gave the strongest signal yet that it was going to invade Rafah as it asked tens of thousands of Gazans to evacuate from the city.