UNITED NATIONS — In a blistering speech to the United Nations, Israeli Prime Minister Benjamin Netanyahu warned Monday that Hamas and the Islamic State group are “branches of the same poisonous tree,” both bent on world domination through terror, just as the Nazis were.

Netanyahu also lashed back at Palestinian President Mahmoud Abbas, who accused Israel last week of carrying out war crimes and waging a “war of genocide” during the fighting in Gaza. Netanyahu said Hamas committed “the real war crimes” in Gaza by using Palestinian civilians as human shields.

“Israel was using its missiles to protect its children. Hamas was using its children to protect its missiles,” he declared.

Addressing the U.N. General Assembly’s annual ministerial meeting, the Israeli leader argued that Israel’s fight against Hamas and the U.S. military campaign against the Islamic State are part of the same cause – the defeat of Islamic extremism.

Netanyahu railed against world leaders for simultaneously condemning the Jewish state for its war with Hamas and praising President Obama for attacking Islamic State militants and other extremists in Syria and Iraq.

“They evidently don’t understand that ISIS and Hamas are branches of the same poisonous tree,” the prime minister said, referring to the Islamic State group by one of its acronyms. “When it comes to its ultimate goals, Hamas is ISIS, and ISIS is Hamas.”

Netanyahu said ISIS and Hamas, as well as other Muslim extremist movements, including al-Qaida, share the goal of imposing militant Islam on the world. He likened them to “another fanatic ideology that swept into power eight decades ago” – Nazism.

Turning to another regional enemy, Netanyahu warned again about the danger of a nuclear-armed Iran and said Iranian President Hassan Rouhani’s condemnation of the spread of terrorism last week amounted to “one of history’s greatest displays of doubletalk.”

Netanyahu accused Iran itself of mounting terrorist attacks all around the world, and lumped the country in with Islamic extremist movements. “To say that Iran doesn’t practice terrorism is like saying Derek Jeter never played shortstop for the New York Yankees,” he said.

He criticized the efforts of six world powers to reach a nuclear deal with Iran, saying: “To defeat ISIS and leave Iran as a threshold nuclear power is to win the battle and lose the war.”

He also launched a scathing attack on the U.N. Human Rights Council, calling it “a terrorist rights council.”