Destroying Hamas would only lead to something more dangerous taking its place, a top Pentagon intelligence official warned on Saturday, as he offered a grim portrait of a period of enduring regional conflict.

The remarks by Lieutenant-General Michael Flynn, the outgoing head of the Defence Intelligence Agency, came as Israeli ministers signalled that a comprehensive deal to end the 20-day-old conflict in the Gaza Strip appeared remote.

Flynn disparaged Hamas for exhausting finite resources and know-how to build tunnels that have helped them inflict record casualties on Israelis. Still, he suggested that destroying Hamas was not the answer.

"If Hamas were destroyed and gone, we would probably end up with something much worse. The region would end up with something much worse," Flynn said at the Aspen Security Forum in Colorado.

"A worse threat that would come into the sort of ecosystem there something like ISIS," he said, referring to the Islamic State, which last month declared an "Islamic caliphate" in territory it controls in Iraq and Syria.

Flynn's comments about the conflict came during a gloomy, broader assessment of unrest across the Middle East, including in Syria and Iraq.

Flynn said bluntly: "Is there going to be a peace in the Middle East? Not in my lifetime."