In a blistering speech to the United Nations, Israeli Prime Minister Benjamin Netanyahu warned on 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.

Addressing the UN 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 Barack 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. He added: "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, from al Qaeda 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."

Turning to another regional enemy, Netanyahu warned that the gravest threat to the world today is the danger of Iran obtaining nuclear weapons. "It's one thing to confront militant Islamists on pickup trucks, armed with Kalashnikov rifles. It's another thing to confront militant Islamists armed with weapons of mass destruction," he said.

Netanyahu said Iranian President Hassan Rouhani's condemnation of the spread of terrorism last week amounted to "one of history'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. "To say that Iran doesn't practice terrorism is like saying Derek Jeter never played shortstop for the New York Yankees," he said.

Netanyahu 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 UN Human Rights Council, accusing it of continually singling out Israel for criticism when other parts of the world are awash in atrocities. He called the Human Rights Council's name "an oxymoron" and charged that the body has become "a terrorist rights council."

Netanyahu said the council's treatment of Israel reflects "the return of one of the world's oldest prejudices."

"It's called anti-Semitism. It is now spreading in polite society, where it masquerades as legitimate criticism of Israel," he said.

Hanan Ashrawi, a member of the Palestine Liberation Organization's executive committee, said Netanyahu's speech was "a blatant manipulation of facts" aimed at misleading world leaders "through a combination of hate language, slander and argument of obfuscation."

In Washington, State Department spokeswoman Jen Psaki took issue with Netanyahu over the similarities between Hamas and Islamic State. She said that while the U.S. considers both terrorist organizations, "we obviously believe that (Islamic State) poses a different threat to the United States."

Saeb Erekat, chief Palestinian negotiator, said Netanyahu, in his remarks, "buried" the possibility of a two-state solution to the Arab-Israeli conflict based on the pre-war borders of 1967. Erekat also complained that Netanyahu branded those who dare to stand up to Israel as anti-Semites.

In his address, Netanyahu questioned how Israel can be accused of genocide, saying no country has gone to greater lengths to avoid civilian casualties by warning Gazans before attacks on neighbourhoods.

"In what world is genocide warning the enemy's civilians in advance?" he asked.

To make his point about the Palestinians putting weapons in civilian areas, Netanyahu held up a photo he said was taken by a French TV network showing two rocket launchers near an apartment building where three children were playing.

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

During the 50-day Gaza war, which ended Aug. 26, Israel launched thousands of airstrikes against what it said were Hamas-linked targets in the densely populated coastal territory, while Gaza militants fired several thousand rockets at Israel.

More than 2,100 Palestinians were killed -- the vast majority civilians, according to the United Nations -- along with more than 70 Israelis.

Hamas official Izzat al-Rishiq told the AP: "We are not terrorists, we are victims of the Israeli occupation who took our land and expelled our people. We are fighting for freedom and independence. Israel is the one that targets civilians."

Iranian diplomat Javad Safaei took the floor at the end of the assembly meeting to protest Netanyahu's speech, saying it was designed "to defend the atrocities they recently committed against civilians."

Safaei said Netanyahu rushed to the General Assembly "to hopelessly wage another war against the whole Islamic world and civilization, associating them baselessly with the ISIS terror group and propagating Iranophobia and Islamophobia."

Associated Press Writers Alexandra Olson and Cara Anna at the United Nations and Matthew Lee in Washington contributed to this report.