The latest Gaza war is heading into new and bloody territory with no end in sight. As with previous conflicts in Gaza (and in Lebanon for that matter), both sides are engaged in what amounts to a brutal negotiation.

For Israel it is about how much of Hamas' rocket and tunnel infrastructure it can destroy before international or domestic pressure for a ceasefire forces its hand.

For Hamas it is about leveraging Israeli losses in terms of soldiers killed, civilians terrorised and international reputation lost in the hope of extracting concessions in any ceasefire. Hamas is balancing two pressures: on the one hand, the pressure from the suffering population of Gaza to bring the fighting to an end; on the other hand the pressure to demonstrate to that same population that it has gained something (usually in the form of either prisoner releases or the easing of the blockade on Gaza) from the suffering it has brought down on them.

There is another important element in the effort to reach a ceasefire, however, and that is the role of the mediator.

In the past, Egypt has played this role. It did not just convey messages between the two sides. It also used its leverage with both sides, but in particular with Hamas, to end the fighting. What is conspicuous about the current conflict is how ineffectual Egypt has been. It put one serious ceasefire proposal on the table that was so lop-sided it had little prospect of being accepted by Hamas.

As a number of commentators have noted, this reflects in part Egypt's domestic situation. President Sisi and the Egyptian military have been locked in a deep conflict with the Muslim Brotherhood for almost a year now. This has in turn undermined Egypt's relationship with Hamas, an offshoot of the Brotherhood.

As observers noted to me during a visit to Egypt last January, many of the individuals in Egyptian military intelligence responsible for the Gaza file have been moved, part of the reshuffle in the military brought about by Sisi's elevation to the position of commander in chief of the army last year.

The new players will not have had as much experience dealing with Hamas, nor the personal relationships built up over time with key Hamas figures. It may also be that the heat and animus generated by the conflict with the Brotherhood in Egypt has infected the attitude of those Egyptian military officials responsible for brokering a ceasefire with the Brotherhood's Palestinian offshoot.

The contrast with the last major round of fighting in Gaza is stark. In 2012 the conflict last eight days; this conflict has run over twenty days with no end in sight. In 2012, then Egyptian President Muhammed Morsi (from the Muslim Brotherhood) played a key role in bringing the fighting to an end, and was lauded for it by both the US and Israel.

Despite the fact that Israel welcomed Sisi's ascendancy to power, it needs an Egypt that can play an effective mediation role in Gaza; one that has real leverage with Hamas. Israel does not want the fighting to go on endlessly, it does not want to reassume responsibility for Gaza and it does not want Hamas totally destroyed, lest political power fall into the hands of even more radical groups in the territory.

The ongoing fighting also has domestic implications for Sisi's regime. Egyptians expect their government to play a role in ending the fighting, not just out of real sympathy for the suffering of Gazans but also for the sake of Egypt's regional standing. But Sisi is not going to be able to build a new relationship with Hamas overnight. It's a problem for Sisi, it's a problem for Israel, but above all it's a major problem for the long-suffering people of Gaza.