Palestinian presidential, parliamentary and municipal elections, conducted in three stages, were held over the course of 2005 and into early 2006. Hamas won municipal seats throughout the West Bank and Gaza, through candidates running either as independents or on behalf of Hamas. It surprised the world, however, when it won 76 of 132 parliamentary seats in the parliamentary election on January 25, 2006. The victory gave Hamas the right to form the government.
The win produced consternation among Israeli and American leaders. Israel refused to deal with Hamas, and continued a relationship through the chairman of Fatah and Palestinian president, Mahmoud Abbas. The United States and the European Union cut off aid to the Palestinian territories because both designate Hamas as a terrorist group.
In the meantime, Israel pursued a plan for a unilateral withdrawal of forces and settlements from Gaza. Both Israel and Hamas called the withdrawal a triumph: Hamas claimed its violent tactics propelled the Israeli departure; Israel claimed its withdrawal demonstrated its good faith and moral superiority.
Violence continued between Palestinian groups, and between these groups and Israel. Various militants, some attached to Hamas or Fatah or others, fired rockets into Israel. Israel responded with attacks and occasional incursions. Militants, as well as the leaders of various family clans affiliated with either groups or organized crime, fought among themselves for power on the streets of the West Bank and Gaza. An escalation in this ongoing battle resulted in Hamas' control of Gaza by the summer of 2007. Clashes between Hamas and Fatah supporters continued following this takeover.