ISRAELI Prime Minister Benjamin Netanyahu has warned that Hamas and the Islamic State group (IS) are branches of the same poisonous tree, both bent on world domination through terror, just as the Nazis were.

In a blistering speech to the UN, Mr Netanyahu also hit 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.

The Israeli leader said Hamas committed "the real war crimes" in Gaza by using Palestinian civilians as human shields.

Addressing the UN General Assembly's annual ministerial meeting, the Israeli leader argued that Israel's fight against Hamas and the US military campaign against IS are part of the same cause, the defeat of Islamic extremism.

Mr Netanyahu railed against world leaders for simultaneously condemning the Jewish state for its war with Hamas and praising US President Barack Obama for attacking IS militants and other extremists in Syria and Iraq. He said: "They evidently don't understand IS and Hamas are branches of the same poisonous tree."

Mr Netanyahu said IS and Hamas, as well as other Muslim extremist movements, from al-Qaida and Nigeria's Boko Haram to Somalia's al-Shabab and Lebanon's Hezbollah, 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.

To protect global peace and security, he said, "we must remove this cancer before it's too late".

Mr Netanyahu warned the gravest threat to the world today was the danger of Iran obtaining nuclear weapons.

The Israeli leader added that Iranian President Hassan Rouhani's condemnation of the spread of terrorism last week amounted to "one of his­tory's greatest displays of doubletalk".

He accused Iran itself of mounting terrorist attacks all around the world, and lumped the country in with Islamic extremist movements.

He also criticiced the efforts of six world powers to reach a nuclear deal with Iran, saying: "To defeat (IS) and leave Iran as a threshold nuclear power is to win the battle and lose the war."

He also attacked the UN Human Rights Council.