Israel has also repeatedly attacked Hamas with air strikes, and, together with Egypt, has blockaded the Gaza Strip since 2007 in what it says is for its security.
Hamas as a whole, or in some cases its military wing, is designated a terrorist group by Israel, the United States, the European Union and the UK, as well as other powers.
Hamas is backed by Iran, which funds it and provides weapons and training.
The BBC's Analysis Editor Ros Atkins explains.