Predictably, the recent unrest on the border separating Israel and the Gaza Strip has given way to a banal debate over the “desperation” of the people of Gaza.

There can be no doubt that the people of Gaza are miserable. They have been living under Hamas rule since 2007. Israel has no choice but to treat the territory as hostile, given that Hamas has stated repeatedly and unequivocally that it seeks nothing less than the destruction of the state of Israel.

And it has backed up its words with deeds, launching multiple rocket wars against the Jewish state, accentuated by attempted commando raids by sea or by tunnel.

Over the last 11 years, the Israelis have kept the coastal enclave cordoned off to varying extents. What comes in and out is undeniably limited — but this doesn’t mean that Gaza has been systematically deprived.

For years now, the Israelis have worked with their adversaries to prevent a humanitarian crisis. Countries like Qatar and Turkey — no friends of Israel — have been invited to work through approved channels to ensure Gaza gets the assistance it needs.

The Israelis have facilitated the transfer of more than 7.5 million tons of material and assistance to Gaza, and that’s just since the last major military conflict with Hamas in 2014.

All the while, however, Hamas continues to take military aid from Iran, and none of those funds are diverted to alleviate the suffering of the Gaza population. The Hamas government siphons also off legitimate donor assistance to build new smuggling and commando tunnels (the Israeli army discovered one just a few days ago), an ever-expanding rocket arsenal and even a new military outpost in Lebanon — likely to be used at a later date for a multifront conflict.

In other words, Hamas continues to give Israel every reason to keep the Gaza Strip contained. And the current riots, in which Israel’s sovereign borders are being threatened by angry hordes, are no exception.

By all accounts, the riots are deliberately designed by Hamas to be an assault on Israeli security cloaked in a cry for humanitarian assistance.

Israeli officials told me during my recent visit that the Hamas government was handing out $100 in cash to some of the rioters. Hamas canceled school so that children could participate. Hamas released prisoners from jail on condition that they rush to the front lines of the conflict and directed protesters to stage the unrest at 13 different locations across the Gaza border, to ensure the Israelis would be spread thin.

The Israelis used a loudspeaker to warn protesters not to breach the fence. They fired tear gas and nonlethal ammunition. And when they deemed necessary, they fired live ammunition to prevent border breaches, shootings, fires (23 fires were started in Israel by flaming kites) and the laying of IEDs.

Israeli officials are remarkably blunt about their own “lack of creativity” in confronting the rioters and the lamentably high number of deaths. But they also charge that Hamas is inflating the actual numbers. Even Hamas officials now cede that the overwhelming majority of the dead (50 of the reported 62) were Hamas members or fighters.

The irony now is that it’s Israeli officials in the Kiriya — Israel’s Pentagon — who are expressing their desperation. They don’t know how to help the people of Gaza so long as Hamas remains in charge.

And at the same time, they are fearful of changing the status quo. Even if Israel wanted to decapitate its leadership, one official told me, the likely outcome would be “the fracturing of Hamas into many parts,” leaving Israel with no discernible “address” for a decision maker.

Thus, Hamas continues to hold some 2 million Gazans hostage, while also leaving Israel with little choice but to maintain order at the border, absorbing one public-relations body blow after another.

In fact, this appears to be the strategy. It’s not as if Hamas believes it’ll gain any significant concessions from Israel. The goal, from what we can tell, is to make Israel as miserable as possible — particularly now, after a series of recent military and diplomatic victories that, perhaps only fleetingly, gave the impression that Israel’s security and strength were expanding.

“This is a problem from hell,” one Israeli official told me in a moment of total candor. It appears that Hamas would like to keep it that way.

Jonathan Schanzer is senior vice president at the Foundation for Defense of Democracies.