Israel held Hamas responsible for all attacks emanating from the Gaza Strip, and has carried out three major military campaigns in Gaza - Operation Cast Lead in December 2008, Operation Pillar of Defence in November 2012 and Operation Protective Edge in July 2014.
The offensives were preceded by escalations in cross-border fighting, with scores of rocket attacks from Gaza, and air strikes against it by Israel.
Hamas emerged from the 2008 and 2012 conflicts militarily degraded but with renewed support among Palestinians in Gaza and the West Bank for having confronted Israel and survived.
The group nevertheless continued to struggle under the joint blockade imposed on Gaza by Israel and Egypt, and became increasingly isolated after falling out with regional powers in the wake of the Arab Spring. The overthrow of Egyptian President Mohammed Morsi, a key ally, in July 2013 was a further blow.
In April 2014, Hamas agreed a reconciliation deal with Fatah that led to the formation a national unity government.
Suicide bombings
Hamas came to prominence after the first intifada as the main Palestinian opponent of the Oslo peace accords between Israel and the Palestine Liberation Organisation (PLO).
Despite numerous Israeli operations against it and clampdowns by the Palestinian Authority, Hamas found it had an effective power of veto over the process by launching suicide attacks.