The fighting is still raging in Gaza. Each day the IDF destroys more and more tunnels and other terrorist infrastructure. Each day, we discover new facets of Hamas’s depravity.

The three soldiers from the Maglan commando unit who were killed on Tuesday in the southern Gaza Strip, were buried in the rubble of a UN clinic. They entered the building to seal a terror tunnel whose entry shaft was located inside the clinic.

A Hamas terrorist was inside the tunnel waiting for them. He detonated the building. Works out that Hamas had booby-trapped the structure, hiding 12 barrels with 80 kg. of explosives each, in a wall.

In a press briefing following the bombing, the commander of the Gaza Division reported that to date Hamas has used more than a thousand improvised explosive devices. Its bombs have destroyed thousands of buildings in the Gaza Strip.

OC Southern Command Maj.-Gen. Sami Turgeman told reporters that with the amount of concrete Hamas used in its tunnels it could have built 100 kindergartens, two hospitals, 20 schools and 20 clinics.

Clearly Hamas’s priorities do not include economic or social development projects for the residents of the area. Dual use materials will always be used first for terrorist purposes. Concern for the welfare of Gaza’s citizenry is at best a distant second.

Indeed, the terror group’s practice of using clinics, kindergartens, schools, hospitals and mosques as weapons storage areas, missile launching sites and command centers makes clear that the welfare of Gaza residents doesn’t even rank in Hamas’s list of organizational goals. As a consequence, the concept of providing “humanitarian aid” to Gaza with Hamas in power is laughable. Every smidgen of aid it receives will go to Hamas’s war machine.

And this brings us to the heart of the matter.

Even in the midst of the fighting it is apparent that we are moving toward the endgame.

The question is, what is the desired end-state? How will we know if we have won? Certainly following America’s lead is not an option. Indeed, the Obama administration is the greatest constraint Israel faces today on its road to victory.

From the actions and words of senior administration officials, it is easy to ascertain where President Barack Obama wants this conflict to end.

First, the administration wants Hamas to remain armed and in control of Gaza. This point was made clear by Lt.-Gen. Michael Flynn, who heads the US Defense Intelligence Agency. In congressional testimony Flynn told US lawmakers, “If Hamas were destroyed and gone, we would probably end up with something much worse.”

This of course is absurd. Hamas wants to kill every Jew in the world. As a practical matter then, it is impossible for any successor regime to be worse. But from Israel’s perspective, more important than discovering that the head of the DIA is an idiot, is Flynn’s revelation that the US wishes to save Hamas from Israel.

The administration’s other positions have all been aligned with this strategic goal of maintaining Hamas in power. Both the US draft cease-fire agreement that Israel rejected, and the White House readout of President Obama’s telephone conversation with Prime Minister Binyamin Netanyahu on Sunday night made clear that the US wants Hamas to be able to prosper.

Secretary of State John Kerry’s cease-fire proposal was explicit on this issue.

A permanent cease-fire deal, it read, must include “arrangements to secure the opening of the crossings, allow the entry of goods and people and… transfer funds to Gaza for the payment of salaries for public employees… ” The last component of the administration’s desired end-state of the war is to use it as a means to force Israel to concede land to the Palestinians in Judea and Samaria, or at least use Israel’s refusal to do so as a means for blaming Israel for continued Palestinian aggression.

Obama made this clear in his conversation with Netanyahu. As the White House’s summary of the conversation reported, “The president stressed the US view that, ultimately, any lasting solution to the Israeli-Palestinian conflict must ensure the disarmament of terrorist groups and the demilitarization of Gaza.”

In other words, the Palestinians will keep shooting until Israel coughs up Judea, Samaria and Jerusalem, and Obama is okay with that.

To summarize, the Obama administration wishes to end the war with Hamas armed and in charge of Gaza, enjoying open borders to the world, and rolling in the dough of international donor dollars and euros, and so in a position to replenish its arsenals and rebuild its tunnels.

The US seeks as well to use this end-state as a means of reinstating its pressure on Israel to surrender land in Judea, Samaria and Jerusalem to the Palestinians.

Israel’s end-state is of course entirely different. Indeed, if the US gets what it wants, then Israel will have lost the war.

The question is, given that this is the US’s position, what can Israel do to win? As the scandalous Federal Aviation Administration flight ban last week made clear, the administration has effectively limitless means to harm Israel. The ban served to instill massive uncertainty into Israel’s export- and tourism-based economy. As Israeli leaders noted, it was the greatest gift to terrorists the US had ever given. Moreover, it was unwarranted and prejudicial.

Whereas the FAA claimed that it acted out of an abundance of caution after a Hamas missile landed a mile from Ben-Gurion Airport, the fact is that such caution exists nowhere else. There is no FAA flight ban on Pakistan, where a civilian aircraft was shot down last month, or in Ukraine. There is no FAA flight ban in Afghanistan or Yemen. Clearly a double standard was used against Israel.

And predictably, when US Sen. Ted Cruz stood up to the administration and demanded an explanation of the FAA’s action and its use of a double standard against Israel, the State Department accused him of lack of concern for US air carriers and passengers.

It was a testament to Cruz’s moral courage that he was willing to risk being wrongly accused of reckless indifference to the safety of US airline passengers in order to decry the administration’s prejudicial treatment of Israel.

And while Sen. Cruz played a central role in revoking the flight ban after 36 hours, the act itself showed how easy it is for the US to hurt Israel without openly attacking it. Other punitive actions have already been undertaken.

While the administration acts in accordance with congressional will and resupplies the IDF and increases the US investment in Iron Dome, it has stopped providing visa services to Israelis interested in traveling to the US. According to I24 News, the US Embassy in Tel Aviv is not issuing travel visas except in emergency circumstances, due to staff reductions during the war.

In light of the constraints Israel faces from the administration, certain operational goals that might otherwise have been achievable must be ruled out. Other actions that might have been reasonable, make no sense, under the circumstances.

The government has determined that the ground operation will go on until the tunnels are destroyed. Whether the operation takes days or weeks or longer, Netanyahu has made it clear that Israel will continue to operate on the ground – even in the framework of a cease-fire – to destroy Hamas’s tunnels.

If we assume that Netanyahu and his ministers will continue to withstand US pressure and continue the operation until it has been completed, the question becomes, what happens then? To neutralize Hamas as a military threat in the future, Israel only needs to secure one goal: In any cease-fire arrangement, Gaza’s borders must remain sealed.

Egypt must continue to prevent smuggling from Sinai to Gaza.

Israel must maintain its naval blockade.

Gaza must remain cut off from the international banking system.

Hamas is fighting to open these borders. And if it makes any gains in this area, Hamas will win. Assuming Israel destroys all or most of Hamas’s offensive capabilities before the fighting ends, the only way to keep Hamas from fighting again is to prevent it from resupplying.

To achieve its goal of keeping Gaza’s borders shut, Israel needs to do two things. First, it needs to complete its operations on the ground as quickly as possible. The faster the IDF removes our ground forces from Gaza the more difficult it will be for Obama to demand that Israel end its maritime blockade of the Gaza coast.

Second, Israel must avoid any cease-fire agreement that involves any international supervision or presence in Gaza. The best option for Israel would be a cease-fire in the form of a letter from Egyptian President Abdel Fattah el-Sisi to Netanyahu and Palestinian Authority Chairman Mahmoud Abbas setting out broad conditions of a cease-fire arrangement.

Any cease-fire that involves US guarantees or supervision or international guarantees or supervision will be an invitation for renewed pressure on Israel and Egypt to open the borders of Gaza and allow Hamas to rebuild its machinery of murder.

The same is the case for international peacekeepers.

Any agreement that involves the deployment of foreign forces to Gaza for any purpose is an agreement that imports human shields to Gaza. As has been Hezbollah’s practice with UN forces in south Lebanon for the past four decades, foreign forces will not interfere with any Hamas operations, but through their very presence in on the ground, they will impede the IDF’s capacity to fight Hamas in the event that such operations becomes necessary.

Netanyahu has stated that Israel’s seeks the demilitarization of Gaza. There are only two ways to achieve that goal – through the reinstitution of Israeli military control over Gaza, and through attrition.

In light of the Obama administration’s support for Hamas’s war goals and actions it has already undertaken to undermine Israel’s war effort, it is fairly clear that it would be unwise for Israel to reconquer Gaza at this time. The price Obama would extract for such a move would in all likelihood outweigh the benefits Israel would gain from physically damaging Hamas directly.

The other option – demilitarization through attrition – is consequently Israel’s strongest option for a victorious endgame today. And attrition can only be secured if Gaza’s borders remain sealed.

War is an ugly thing. War with terrorist murderers who lack a shred of human decency is a very ugly thing.

There are no guarantees that Israel will not have to fight again. And if Obama gets even some of what he is demanding, Israel will have to fight again, and soon.

Under these circumstances, Israel’s best bet is to destroy the tunnels quickly and secure cease-fire terms that keep Gaza isolated to reduce to a minimum Hamas’s ability to fight again.

The writer is the author of The Israeli Solution: A One-State Plan for Peace in the Middle East. This article was originally published in the Jerusalem Post.