During the second Palestinian "intifada", I was sitting in the offices of Hizbollah's Al-Manar television station in Beirut, watching news footage of a militiaman's funeral in Gaza. The television showed hordes of Hamas and PLO gunmen firing thousands of rounds of ammunition into the air to honour their latest "martyr"; and I noticed, just next to me, a Lebanese Hizbollah member – who had taken part in many attacks against the Israelis in what had been Israel's occupation zone in southern Lebanon – shaking his head.

What was he thinking, I asked? "Hamas try to stand up to the Israelis," he replied. "But..." And here he cast his eyes to the ceiling. "They waste bullets. They fire all these bullets into the sky. They should use them to shoot at Israelis."

His point, of course, was that Hamas lacked discipline, the kind of iron, ruthless discipline and security that Hizbollah forged in Lebanon and which the Israeli army was at last forced to acknowledge in southern Lebanon in 2006. Guns are weapons, not playthings for funerals. And Gaza is not southern Lebanon. It would be as well for both sides in this latest bloodbath in Gaza to remember this. Hamas is not Hizbollah. Jerusalem is not Beirut. And Israeli soldiers cannot take revenge for their 2006 defeat in Lebanon by attacking Hamas in Gaza – not even to help Ms Livni in the Israeli elections.

Download the new Independent Premium app Sharing the full story, not just the headlines

Not that Hizbollah won the "divine victory" it claimed two years ago. Driving the roads of southern Lebanon as the Israelis smashed the country's infrastructure, killed more than a thousand Lebanese – almost all of them civilians – and razed dozens of villages, it didn't feel like a Hizbollah "victory" to me, theological or otherwise. But the Israelis didn't win and the Hizbollah were able to deploy thousands of long-range rockets as well as a missile which set an Israeli warship on fire and almost sank it. Hamas have nothing to match that kind of armoury.

Nor do they have the self-discipline to fight like an army. Hizbollah in Lebanon has managed to purge its region of informers. Hamas – like all the other Palestinian outfits – is infected with spies, some working for the Palestinian Authority, others for the Israelis. Israel has successively murdered one Hamas leader after another – "targeted killing", of course, is their polite phrase – and they couldn't do that without, as the police would say, "inside help". Hizbollah's previous secretary general, Sayed Abbas Moussawi, was assassinated near Jibchit by a missile-firing Israeli helicopter more than a decade ago but the movement hasn't suffered a leader's murder in Lebanon since then. In the 34-day war of 2006, Hizbollah lost about 200 of its men. Hamas lost almost that many in the first day of Israel's air attacks in Gaza – which doesn't say much for Hamas' military precautions.

Israel, however – always swift to announce its imminent destruction of "terrorism" – has never won a war in a built-up city, be it Beirut or Gaza, since its capture of Jerusalem in 1967. And it's important to remember that the Israeli army, famous in song and legend for its supposed "purity of arms" and "elite" units, has proved itself to be a pretty third-rate army over recent years. Not since the 1973 Middle East conflict – 35 years ago – has it won a war. Its 1978 invasion of Lebanon was a failure, its 1982 invasion ended in disaster, propelling Arafat from Beirut but allowing its vicious Phalangist allies into the Sabra and Chatila camps where they committed mass murder. In neither the 1993 bombardment of Lebanon nor the 1996 bombardment of Lebanon – which fizzled out after the massacre of refugees at Qana – nor the 2006 war was its performance anything more than amateur. Indeed, if it wasn't for the fact Arab armies are even more of a rabble than the Israelis, the Israeli state would be genuinely under threat from its neighbours.

One common feature of Middle East wars is the ability of all the antagonists to suffer from massive self-delusion. Israel's promise to "root out terror" – be it of the PLO, Hizbollah, Hamas, Islamic Jihad, Iranian or any other kind – has always turned out to be false. "War to the bitter end," the Israeli defence minister, Ehud Barak, has promised in Gaza. Nonsense. Just like the PLO's boast – and Hamas' boast and Hizbollah's boast – to "liberate" Jerusalem. Eyewash. But the Israelis have usually shown a dangerous propensity to believe their own propaganda. Calling up more than 6,000 reservists and sitting them round the Gaza fence is one thing; sending them into the hovels of Gaza will be quite another. In 2006, Israel claimed it was sending 30,000 troops into Lebanon. In reality, it sent about 3,000 – and the moment they crossed the border, they were faced down by the Hizbollah. In some cases, Israeli soldiers actually ran back to their own frontier.

These are realities. The chances of war, however, may be less easier to calculate. If Israel indefinitely continues its billion dollar blitz on Gaza – and we all know who is paying for that – there will, at some stage, be an individual massacre; a school will be hit, a hospital or a pre-natal clinic or just an apartment packed with civilians. In other words, another Qana. At which point, a familiar story will be told; that Hamas destroyed the school/hospital/pre-natal clinic, that the journalists who report on the slaughter are anti-Semitic, that Israel is under threat, etc. We may even get the same disingenuous parallel with a disastrous RAF raid in the Second World War which both Menachem Begin and Benjamin Netanayahu have used over the past quarter century to justify the killing of civilians.

And Hamas – which never had the courage to admit it killed two Palestinian girls with one of its own rockets last week – will cynically make profit from the grief with announcements of war crimes and "genocide".

At which point, the deeply despised and lame old UN donkey will be clip-clopped onto the scene to rescue the Israeli army and Hamas from this disgusting little war. Of course, saner minds may call all this off before the inevitable disaster. But I doubt it.