The Islamic Resistance Movement Hamas was established during the start of the First Intifada in December 1987. It was founded by Sheikh Ahmad Yassin and other members of the Muslim Brotherhood in Palestine, who eventually turned Hamas into an autonomous organisation with its own charter and strategies. Hamas is described as a nationalist Islamist movement with political, military, and social branches. The party became Fatah’s main rival and a strong opponent of the policies of the Palestinian Authority (PA).
Isreal chose to back the lesser of two evils( in their minds) and it backfired. See the usa and the Mujahideen.