Trouble has been brewing between Israel and Hamas for months. The signs were there before the Israeli and Palestinian teenagers were kidnapped and murdered, and before Israel’s crackdown on Hamas in the West Bank. It’s all horribly familiar. Missiles, rockets and threats, and another Israeli prime minister saying that this time military action would make his people safer.

History shows that military action merely deepens the conflict. Only a proper peace deal will make Palestinians and Israelis safer. There is no chance of one right now, which means more small wars, which will eventually become much bigger ones.

Palestinians who live in Gaza often call it the world’s biggest prison. They mean that about 1.8 million people live in a small strip of land, and most of them are not allowed out by Israel and Egypt, which control the border crossings. In Gaza, the human spirit is strong and it can be a surprisingly cheerful prison, but not now, of course.

The main route into Gaza for a journalist is through the Erez checkpoint from Israel. Erez looks a shiny airport terminal, empty and echoing except for the security guards with automatic weapons, and bored young women in the glass passport booths checking their mobiles. To cross, you need a foreign passport and an Israeli press card.

After a series of corridors and steel turnstiles is a concrete wall with a steel door. It slides open, controlled by a distant Israeli at the other end of the CCTV, and Gaza is on the other side. Next comes a kilometre-long wired-in walkway. If you’re lucky, a few Palestinians granted permission by Israel to approach the gate will be waiting. They run a shuttle service that links up with taxis that take you to the Hamas checkpoint. Israel destroyed their small terminal when the current war started. Now they’re back to noting down passport numbers in a ledger on a table under the shade of a tree.

It wasn’t always like that. When I started visiting Gaza in 1991, hundreds of thousands of Palestinians crossed Erez every day to get to work. Paul Adams, my BBC colleague, told me that when he first went to Gaza, teaching on a gap year in 1980, he took a party of Palestinian children on a public bus from the West Bank for a day at the seaside.

Now, anyone who could negotiate a public bus service from the West Bank to Gaza would at the very least get a nomination for the Nobel Peace Prize. The diplomat who found a way to stop the killing on Gaza’s beaches and streets would deserve much more than that.

I saw Binyamin Netanyahu, Israel’s prime minister, giving an interview to the BBC after Israel had killed more than 60 people in the Gaza district of Shejaiya. He said he regretted the civilian casualties in Gaza but they were the fault of Hamas. Netanyahu said Israel had warned people to get out. Some had taken the advice; others had been prevented from leaving by Hamas.

I was back in London for my son’s 11th birthday party by the time all those people were killed in Shejaiya. But my impression of Hamas is different from Netanyahu’s. I saw no evidence during my week in Gaza of Israel’s accusation that Hamas uses Palestinians as human shields. I saw men from Hamas on street corners, keeping an eye on what was happening. They were local people and everyone knew them, even the young boys. Raji Sourani, the director of the Palestinian Centre for Human Rights in Gaza, told me that Hamas, whatever you think of it, is part of the Palestinian DNA.

I met Sourani first when he was condemning abuses by Yasser Arafat’s men. He has taken an equally tough stance on Hamas. Now he says Israel is violating the laws of war by ignoring its legal duty to treat Palestinian civilians as protected non-combatants.

Hamas, human rights groups say, also violates the laws of war by firing missiles at civilians. I used to be very cynical about international humanitarian law. When I heard, some time around the end of the Bosnian war in 1995, that the UN was setting up a tribunal to prosecute war criminals in the former Yugoslavia I thought it was a bad joke. I feel differently now, especially after testifying four times at the tribunal. I don’t think anything similar is coming for the Israelis and Palestinians. But the laws of war are the best way we have to measure the degrees of horror that human beings inflict on each other.

When I left Gaza, Palestinian rockets were landing uncomfortably close to Erez crossing. When the alert sounded, our Israeli driver leapt out, leaving the engine running, and took cover behind a wall. It is very frightening to be caught up in a rocket attack like that. Israeli civilians have been protected by the Iron Dome anti-missile system, by a big investment in civil defence (in the border town of Sderot, even the bus stops double as bomb shelters) and because their people are trained from childhood about how to take cover.

But it is wrong to suggest that Israeli civilians near Gaza suffer as much as Palestinians. It is much, much worse in Gaza. I defy anyone with an ounce of human feeling not to feel the same after ten minutes in Gaza’s Shifa Hospital with wounded and dying civilians. In the mortuary, it’s so overcrowded that the bodies of two children are crammed on to a single shelf. One day, they had only found enough of the remains of six women and children to fill a single stretcher.

Before Gaza, I’d spent most of the past two months in Baghdad, Beirut, Jerusalem, Aleppo and Damascus. The Middle East is on fire. I haven’t seen anything like it since my first reporting trip to the region in 1990. I don’t think anyone knows how to put the fire out.

Jeremy Bowen is the BBC’s Middle East editor and the author of “The Arab Uprisings” (Simon & Schuster, £8.99)