July 29, 2014 – Gaza City, Gaza Strip: The home of Hamas Leader Ismail Haniyeh was destroyed over night by Israeli airstrikes on Tuesday, July 29, 2014. Attacks from both sides continue as peace talks are continued. (Max Becherer/Max Becherer/Polaris Images For The Washington Post)

AS EFFORTS to forge even a temporary truce in Gaza founder, the Obama administration is indignantly protesting that its diplomacy has been unfairly maligned by critics, especially in Israel. Secretary of State John F. Kerry, officials say, has merely been trying to stop the bloodshed on the basis of previous cease-fire agreements, including an Egyptian plan that Israel accepted just two weeks ago.

The U.S. account is mostly correct, and even some Israeli officials have acknowledged that the bitter and sometimes personal criticism of Mr. Kerry in Jerusalem went too far. Yet there is a good reason why Israelis across the political spectrum, as well as the Egyptian government and Palestinian Authority President Mahmoud Abbas, reacted badly to Mr. Kerry’s efforts. U.S. strategy has failed to take into account how the fighting in Gaza during the past two weeks, as well as the Middle East’s shifting political alignments, have changed how its closest allies view the conflict’s endgame.

The big revelation of this Gaza fight has been the degree to which Hamas has invested in stockpiling missiles capable of striking Israeli cities and constructing cross-border tunnels whose only purpose is to carry out offensive attacks inside Israel. Israel is insisting, reasonably, that its troops remain in Gaza at least long enough to destroy the tunnels. It is also making the obvious point that a solution to the conflict must prevent Hamas from focusing Gaza’s economy on the production of more missiles and tunnels.

Mr. Kerry’s proposal did not directly tackle that problem. While promising vaguely to “address all security issues,” it offered Hamas the explicit prospect of a border opening and funding to pay its government employees. These terms were promoted by Hamas’s regional allies, Turkey and Qatar. Mr. Kerry’s resort to them as mediators was another questionable call: It had the effect of sidelining the secular governments of Egypt and Mr. Abbas, which stand on the other side of the Middle East’s divide between pro- and anti-Islamist forces.

Israel is demanding that Hamas be disarmed as a part of any peace. While the Obama administration rhetorically endorsed that goal, it doesn’t seem to regard it as feasible in the short term. In our view, the objective should be explored more seriously. It might be possible, for example, to make Hamas’s surrendering of its missiles the condition for steps that would enable Gaza’s economic development, such as the opening of a seaport — a trade-off that most Gazans would welcome. At a minimum, new security provisions should aim at preventing Hamas from importing more military supplies.

More broadly, the Obama administration should be working with Egypt and Mr. Abbas, as well as Israel, to end the conflict in a way that reduces rather than reinforces Hamas’s power over Gaza. This is not unrealistic: A recent agreement between Mr. Abbas’s Fatah movement and Hamas to form a single government for the West Bank and Gaza, followed by elections for new leaders, could provide a mechanism. Mr. Abbas, who has been working closely with Egypt, is reportedly proposing that his U.S.-trained security forces secure the border between Gaza and Egypt, displacing Hamas.

In its zeal to stop the bloodshed in Gaza, the Obama administration may have set back such creative and constructive solutions. Now it should get behind them.