It’s been close to two weeks since Israel’s war in Gaza ended—for the time being—with an extended ceasefire. Now with some hindsight, what’s more apparent is how much Israel miscalculated and how much it underestimated its enemy.

This is also the subject of a major debate within Israel’s own spy agencies. The Israel Defense Forces’ Military Intelligence Directorate and Shin Bet—Israel’s domestic counter-terrorism agency—are squabbling over who is to blame for several mistakes made before and during the war.

The details, reported by Haaretz’s Amos Harel, “points to difficulties in deciphering the intentions of Hamas prior to the outbreak of the war and an under-estimation of Hamas’ readiness and determination to continue fighting.”

Sixty-five Israeli soldiers died in the conflict, more than six times the number killed during the Operation Cast Lead ground invasion in 2009. More than 2,100 Palestinians died, including hundreds of Hamas fighters. Israel also committed some of its heaviest ground forces, including the highly mobile 36th Ga’ash Armor Division.

All of this for ostensibly destroying tunnels leading from within the Gaza Strip into Israeli territory.

But as Harel notes, the Israeli government added tunnels to its list of objectives—their main objective—well after a week into the military operation. It wasn’t until Hamas fighters began staging attacks using the tunnels that Israel sold their existence as a new, unexpected and existential threat.

To be sure, it’s not as if Israeli intelligence wasn’t aware of the tunnels already.