I think it’s also worth pointing out that Israel helped create Hamas.
Hamas was officially founded in 87 during the first Intifada, but its roots were planted much earlier by Sheikh Ahmed Yassine who was a member of the Muslim brotherhood. The brotherhood had been repressed in Gaza prior to 67 by Egypt. Once Israel invaded Gaza they didn’t just turn a blind eye to the Islamists, they actively encouraged them (especially the right wing elements) because they wanted to undermine the dominant political Palestinian party at the time; the PLO, at the heart of which was the secular Fatah part led by Yasser Arafat.
By empowering Sheikh Yassine the Israelis thought they could divide and rule the occupied Palestinians by playing off secular nationalists v religious islamists. So in 1978 when Yassine wanted to make his Islamic association official (which was the precursor to Hamas), the Israeli’s were more than happy to help. Yassine built institutions such as schools, clubs and mosques, with many of these funded by Israel.
Arafat went on record to state Hamas was a creature of Israel and that Rabin had confirmed this to him. But you don’t have to take Arafats word for it as this was later confirmed by top Israeli officials. General Yitzhak Segev told the New York Times that he helped finance the Islamic movement. Colonel David Hacham admitted the original sin was Israeli support for Yassine in the 70’s. Avner Cohen who was the Israeli official responsible for religious affairs in Gaza is quoted as saying “Hamas to my great regret is Israel’s creation”. He even wrote an official report for his superiors in the 80’s warning them not to play divide and conquer in the occupied territories, calling them “To break up this monster before this reality jumps in our face”.
The inconvenient truth for Israel is that Hamas is in part a creature of their own making.