It’s easy to criticize the Israeli government’s response to the rockets launched from Gaza in recent weeks. It’s harder to offer an alternative. But honest critics have an obligation to try. So here goes.

The short answer is that I’d treat the rockets as military symptoms of a political problem. That doesn’t mean Israel shouldn’t return fire. If Hamas and Islamic Jihad can attack Israel with impunity, they may never stop. But returning fire—or even invading Gaza—will never make Israel safe.

Israel can destroy Hamas’ rockets, but Hamas will eventually rebuild them bigger and better, as it did after the last war, and the one before that. And in the relatives and friends of the Palestinians killed in Operation Protective Edge, it will find plenty of new recruits willing to fire them. Israel can overthrow Hamas and then pull back, but it will leave in its wake Somalia-like chaos that gives groups even more radical than Hamas free reign. Israel can overthrow Hamas and try to install Fatah, but doing so will harm the latter as much as the former because any faction that rides into Gaza atop an Israeli tank will lose its public legitimacy forever. Israel can overthrow Hamas and try to govern Gaza itself, but that would require Israeli 18- year-olds to permanently patrol house-to-house in a territory where they’re constantly at risk of becoming the next Gilad Shalit.

So what would I do? First, I’d seek a cease-fire that eases those aspects of Israel’s blockade that have no legitimate security rationale. (That doesn’t mean acceding to Hamas’ cease-fire demands but it means recognizing that a cease-fire that does nothing to address the blockade - as Israel wants - won’t last).

Here are a couple of examples. Since 2010, Israel has made it easier for goods to enter Gaza. But it still makes it extremely difficult for goods to leave. According to the Israeli human rights group Gisha, only two percent as many truckloads leave the Strip as did in 2007. If Israel wants to check those trucks to ensure they’re not carrying weapons, fine. (Last December, the Netherlands tried to donate a high-tech scanner for exactly that purpose).

But essentially barring Gazan exports to Israel and the West Bank — historically Gaza’s biggest markets — is both inhumane and stupid. It’s helped destroy the independent business class that could have been a check on Hamas’ power, and left many in Gaza with the choice of working for Hamas or receiving food aid.

In addition to goods, Israel should make it easier for people to leave Gaza, too. A quarter of Gazans have family in the West Bank. Yet even before this war, Israel allowed Gazans to travel to the West Bank only in “exceptional humanitarian cases.” Yes, Israel can restrict the travel of terrorists. But preventing young Gazans from studying in the West Bank - like preventing Gazan businessmen from exporting there - is self-defeating and inhumane. It feeds the isolation and despair that Hamas exploits.

Second, I’d let Hamas take part in a Palestinian unity government that prepares the ground for Palestinian elections. That doesn’t mean tolerating Hamas attacks, to which Israel should always reserve the right to respond. But it means no longer trying to bar Hamas from political participation because of its noxious views.

It’s common to hear pro-Israel hawks ridicule Mahmoud Abbas for lacking authority over Gaza and for serving the 10th year of a four-year presidential term. But by opposing Palestinian elections, Israel creates the very circumstance its supporters bemoan. Without free elections — which means elections in which all major Palestinian parties can run — Palestinian leaders will never enjoy authority in both Gaza and the West Bank nor the legitimacy to make painful compromises on behalf of their people.

Israel wants Hamas barred from any Palestinian unity government, and any Palestinian election, until it accepts the two-state solution and past peace agreements. But as I’ve suggested before, the current Israeli government probably couldn’t meet those conditions.

There’s a better way. What’s crucial is not that Hamas as a party endorse the two-state solution. After all, Likud as a party has not endorsed the two state-solution, either. What’s crucial is that Hamas promise to respect a two-state agreement if endorsed by the Palestinian people in a referendum. In the past, Hamas leaders have told the media they would. Israel, or its Western allies, should get that pledge in writing, and, in return, allow the free elections necessary to produce a Palestinian leadership with the legitimacy to make a deal.

Finally, Israel should do everything it can — short of rigging the elections — to ensure that Hamas doesn’t win. Already, polls show that Abbas would defeat Hamas leader Ismail Haniyeh easily. (If Israel really wanted to crush Hamas, it could release jailed Fatah leader Marwan Barghouti, who has strongly endorsed the two state solution, and who in polls defeats Haniyeh by an even larger margin). But Israel could also help ensure Hamas’ defeat by showing Palestinians that Abbas’ strategy of recognizing Israel, and helping it combat terrorism, actually works. It could do so by freezing settlement growth and publicly committing to a Palestinian state near the 1967 lines with a capital in East Jerusalem. That would give Abbas an instant boost.

Hamas’ great ally is despair. It grows stronger when Palestinians decide that settlement growth has made the two-state solution impossible. It gains strength when Palestinians decide that leaders like Abbas and Salam Fayyad are fools for helping Israel police the West Bank while getting only massive settlement subsidies in return.

Nothing would weaken Hamas more than growing Palestinian faith that through nonviolence and mutual recognition, they can win the basic rights they’ve been denied for almost half a century. Israel’s best long-term strategy against Palestinian violence is Palestinian hope. Unfortunately, as effective as Benjamin Netanyahu has been at destroying Palestinian rockets, he’s been even more effective at destroying that.