When Avi Issacharoff, the co-creator of Fauda, was plotting the next series of the hit Israeli thriller, the scriptwriting team came to him with an idea so outlandish that he rejected it.

“One of the ideas they brought was of tens of militants storming the border, taking a kibbutz or a village by surprise and controlling it,” Issacharoff recalls. “I was like: ‘Guys, come on, what is this? This is a show that is trying to be authentic and realistic. This thing that tens of armed people would get to the border without anyone seeing them, without anyone knowing about that before? With no intelligence indication? At the end of the day, they will come to the border and a few planes or choppers will kill them all. So don’t go there. It’s too stupid.’ And that was it. After 10 or 15 minutes of discussing it, we left it and we went to another scenario.”

Issacharoff is a former journalist who specialized in covering Palestinian affairs and had contacts in Hamas. He used this knowledge, along with his experience of serving in the Israel Defense Forces, to create Fauda with Lior Raz, a special forces veteran turned actor who plays the lead.

Avi Issacharoff and Lior Raz, creators of the Israeli TV series Fauda.

Raz’s character, Doron, is a retired officer in a counterterrorism special forces unit who gets dragged back into undercover work. Raz has the closest possible experience of terror. When he was 19 his girlfriend was stabbed to death by a terrorist.

“Fauda” means chaos, and amid the twisting plots and bloody carnage the writers also created uncertainty in the minds of viewers. Both the Israelis and Palestinians are fully rounded characters. Terrorists are shown to have a human side.

“On Israeli television you usually have good Israelis and bad Palestinians, simple as that. We confuse the audience. You like and dislike the Israeli characters. You like and dislike the Palestinian characters,” Issacharoff told me before the show first hit British screens a few years ago — and went on to become a global hit on Netflix.

As we speak by phone, Issacharoff is in Tel Aviv trying to absorb the enormity of the terrorist attacks. Among the dead were the children of people he knows who had been dancing at the Supernova music festival when they got caught up in the massacre.

As the conflict erupted, he and Raz went to Sderot, a town near Gaza, to work with a civilian group evacuating Israelis. Raz posted a video clip of him and another volunteer, Yohanan Plesner of the Israel Democracy Institute, sheltering as rockets tore across the sky above them.

Both the Israelis and Palestinians are fully rounded characters. Terrorists are shown to have a human side.

“It’s a danger zone. To stay is kind of Russian roulette,” Issacharoff says. “They don’t know how, where or when the next rocket would fall. And they only have like 30 seconds of siren warning. And some of them, because it’s a kind of a poor town, don’t have vehicles.

“Others are afraid even to drive their own vehicles. So what we did is just to try to get them transportation and the feeling of security that now you’re with people — most of [whom] have seen the battlefield — to help you.

“There were rockets all around us. We picked up a family of three, a mother and two children. And then some shooting started behind me. I saw it in my mirror. I wasn’t harmed and so I just left the place. And I don’t know if it was a terrorist or just a mistake.”

Despite his deep knowledge of Hamas, Issacharoff rejected the idea of a terrorist invasion of Israel as a plotline for the fifth series of Fauda because it did not seem possible that they had the weaponry, immediate intent or ability to evade Israel’s spies and border forces. This view was apparently shared by the Israeli government, armed forces and intelligence services.

Destroying Hamas as a government will be relatively easy, Issacharoff suggests. But finding individual leaders and leaders of the military wing will be much harder.

“Look, we knew they were sophisticated and big and strong. We didn’t know how sophisticated, big and strong. I didn’t think that they had any interest in escalating the situation, but it seems like they did.

“But [the plotline] sounded ridiculous, because what are the chances that everything is going wrong at the same time? It’s like Murphy’s Law. It’s the lack of intelligence. It’s the way that the soldiers on the ground operated, the way that the air force operated. If Hamas would have tried, they probably would win the lottery that day. But for them the lottery was killing Israelis.”

Issacharoff has been under no illusions, however, about Hamas’s embedded hatred of, and desire to destroy, Israel. “Many of them I knew personally. They used to talk to me a lot. Not any more. When you sit down with them and you hear the declarations about Israel it seems like they are crazy, but it seems like this is their ideology and they are very radical so they don’t think through the same methods or the same logic that I have as someone who has a Western mind, let’s put it that way.

“They say: ‘We will eliminate the Zionist entity.’ They don’t even call us Israel. They say the ‘Jewish entity’ or the ‘Zionist entity’.”

He believes that Hamas succeeded in the attacks beyond their greatest expectations. “Their success was too big even for them. They have 200 hostages in Gaza, including very old people and women. And it makes them look very bad in the international media.”

The brutality of the attacks has also united Israel, which had been very divided politically, against Hamas. “Of course, you would find some people that are doubting the success of this kind of an operation; that are doubting whether we should go in. But it’s a very small minority. Because of the killing of 1,400 and the kidnapping of 200 others, there’s a rare consensus in the Israeli public. Not around Netanyahu — this government cannot really function — but about the need to eliminate Hamas’s regime. And I don’t think that they saw it coming. I’m sure that part of their decision to go and strike was the thought that Netanyahu is very weak and he won’t be able to get a consensus or support from the Israeli public going into a military operation that includes a ground incursion.

Among the dead were the children of people he knows who had been dancing at the Supernova music festival.

“Support for this kind of an operation right now is very, very high. Among everyone that I’ve been talking to, people understand that we cannot just stay and bomb from the outside and that’s it. [Then] Hamas will stay in power.”

Destroying Hamas as a government will be relatively easy, he suggests. But finding individual leaders and leaders of the military wing will be much harder. “They’ve probably been hiding in southern Gaza since two days ago. So it’s not going to be easy. The problem is not with bringing them down. The problem is what will happen the day after. Who’s going to take care of the sewage and electricity and the water of Gaza? It’s two million very poor people. Who’s going to take care of them? And that’s the main problem.”

Issacharoff believes that Hamas succeeded in the attacks beyond their greatest expectations. “Their success was too big even for them.”

He suspects that Hamas also calculated on Hezbollah in Lebanon launching a full assault on Israel, which hasn’t happened yet. “The US intervened on behalf of the state of Israel in saying very clearly and loudly to Hezbollah and Iran: ‘Be careful before you do very foolish mistakes like jumping into the war and joining Hamas.’ I think that [Hamas] really counted on a second front from Lebanon. And still there’s a very good chance that it will happen.”

In Fauda a lot of Palestinians are killed. When asked about that in the past, Issacharoff has said that is the reality of war. “We didn’t try to make it look nice. I don’t know if many [international] viewers of the show understand what it’s like in a war. We know.”

The reality of the Israeli response to the appalling terror is clear now. “They bombed houses from the air with no warning. There are many civilians that got killed. And that’s the sad reality of declaring a war. What do you expect? I think that their aim now is to make as many people as possible flee from the northern part of Gaza to the south part of Gaza. They don’t want to kill too many civilians,” he said, speaking before the bombing of a hospital in Gaza City on Tuesday night. “But I understand that many of them stayed in their houses, meaning that there will be casualties among civilians.”

He suggests that Hamas is even telling people to stay put in Gaza. “Hamas is the most cynical, cruel organization that one can imagine. It’s using the local population as a human shield. And in a way they hope many of the civilians will get killed in order to show to the international public opinion, ‘Look at the bad Israelis and what they’re doing.’”

I ask if he has had a chance to speak to any of the Palestinian actors who might have connections to Gaza. At the moment his focus is not on Fauda. “I didn’t get the chance to talk to actors, actresses, Jews, Muslims, Christians. I’m still trying to understand what’s going on in the war.” His discussions focus on something much more important than a TV show: “living”.

Damian Whitworth is a features editor at The Times of London