Palestinian medics treat a wounded boy following an Israeli air strike on a family house, at a treatment room of al Najar hospital in Rafah, in the southern Gaza Strip on Monday.

It's not hard to understand why Israel under Prime Minister Benjamin Netanyahu decided to invade Gaza: The Israelis have a right to protect themselves from terrorists who launch rockets into populated areas of the country or invade through underground tunnels.

But with more than 500 Palestinian dead along with nearly 30 Israeli soldiers, Israel's decision has come at a grim price. Many of the victims have been the innocent — four Palestinian children playing on a beach or an Israeli civilian killed as he gave food to soldiers. More pages to long chapters of heartbreak in the Middle East.

The Obama administration and regional powers such as Egypt and Qatar now need to pressure Israel and Hamas to end this conflict before it devolves into chaos. U.S. Secretary of State John Kerry was due in Cairo Tuesday to attempt to broker a ceasefire. Even given the swirling rivalries in the Arab world, surely that must still be possible.

The fault, of course, lies with Hamas, whose leaders cynically fire rockets at Israel hoping to draw the Israelis into a fight. But while the Israelis must respond to such criminal acts, Netanyahu risks further inflaming the hatred in the region with his latest incursion into Gaza, which, like other Israeli operations in 2012 and 2008-2009, won't likely be any more successful in leading to a permanent solution.

That would be a peace accord between Israel and the Palestinian Authority and moderate Palestinians such as Mahmoud Abbas, their president. Kerry tried to broker such a deal earlier this year but his efforts ended unsuccessfully in April. What followed was a reconciliation agreement between the Palestinian Authority and Hamas, which affirmed the authority's commitment to peace with Israel. Israel opposed the agreement.

For now, the best thing would be a ceasefire and an Israeli pullback. In time, perhaps, Kerry can attempt to restart talks aimed at a broader agreement. The politics and power plays are more complicated than ever in the Middle East these days, and there is no guarantee that the various players will cooperate.

But Kerry should try. He has to try, or the flow of blood will continue in Gaza.