What you neglect to mention though is that they had been firing rockets into Israel's civilian population.
Hamas offered an agreement to Israel for both sides to stop killing civilians. Israel rejected the offer.
If Israel does not care about its civilians, why should Hamas?
When and what agreement?
The main question was about the settlers: Are they civilians or not? According to the Geneva Accord they are not. Even according to the Israelis they are not.
In 2003 we went to Cairo. The Egyptians asked whether Hamas is ready to stop the martyrdom operations or not. We gave the Egyptians a better offer. We were ready to have an agreement to stop targeting civilians [on] both sides. The army is supposed to fight, but civilians should be out of it. The Egyptians agreed and passed it on to the Israelis.
Ariel Sharon sent Efraim Halevi, who was the head of Shin Bet at the time. The Egyptians, who were the mediators, negotiated with Halevi. When we reached the definition of civilians, we accepted the definition put forward by the Geneva Accord. The Israelis were surprised, as they did not expect that. We said that the settlers are not civilians and the answer was, yes, they are not.
Halevi went back to Israel, but Sharon rejected the proposal.
A Dialogue with Hamas - Part 1 - Worldpress.org