A senior army intelligence official has admitted that Israel underestimated the tenacity of Gaza terrorists and did not expect the July-August 50-day conflict to last so long — insisting, however, they were soundly beaten.

The conflict, which ended with a fire last week, killed more than 2,100 Gazans — 1,000 of whom Israel says were engaged in active combat, and others that it accuses terrorists of using as human shields during the clashes — as well as 66 soldiers and six civilians on the Israeli side, in the bloodiest battle to date between the Jewish state and Hamas.

“If you’d asked me two months ago, I wouldn’t assess that it’s going to take us 50 days,” the official told journalists in English at a briefing in Tel Aviv late Tuesday.

“We thought it’s going to take them a shorter time to understand what happened, and we are mistaken here. It’s a tactical assessment mistake, but it’s a mistake,” said the official, speaking on condition of anonymity.

He said the training of some Hamas militants had impressed him, but that there were no “surprises” for Israeli forces.

“They were in pretty good shape and pretty well trained,” he said of amphibious commando-style raids by Hamas militants on Israeli shores.

“You can see for sure they were trained outside of the Gaza Strip,” the official said, but added “we haven’t seen anything that has surprised us” militarily.

But the official said Hamas, the main power in Gaza, and Islamic Jihad, the next biggest terror group, were soundly beaten.

“We think they are in very bad shape,” he said, pointing out that two-thirds of the terrorists’ rocket stores had been wiped out and several hundred of them killed in Operation Protective Edge.

Hamas and Israel agreed an Egyptian-mediated open-ended truce on August 26, with both sides hailing it as a victory.