TWICE THIS month, over weekends, a full-scale war with Gaza was prevented at the last minute. Nonetheless, though it may have been avoided temporarily, the threat still looms on the near horizon.Fridays on the Israel-Gaza border are very tense as it is the Muslim holy day. Each week they go to mosques, pray and hear inciteful preaching. Inspired – and in many cases financed – by Hamas leadership, thousands of Gazans have gathered each Friday following prayers near the border fence in order to protest against the Israeli blockade.But these are not peaceful demonstrations.The protesters consistently try to infiltrate Israel, damage the security fence, and target Israeli military positions and civilian machinery.They fly arson kites, balloons and condoms filled with helium gas that burn fields, orchard groves and nature reserves on the Israeli side of the border.Each Friday over the last four months contained the potential for an all-out war.Each minor incident had the potential to get out of hand and turn into a major escalation, a lead-up to a war.And this is exactly what happened twice in July. On Friday, July 14, the Israel Air Force (IAF) attacked a balloon launching pad and – unlike in previous similar strikes – Hamas activists were killed.Hamas and Palestinian Islamic Jihad (PIJ) responded by firing nearly 200 rockets and mortar shells in the direction of Israeli rural settlements. The IAF retaliated the next day (Saturday) by striking 40 Hamas and PIJ targets, including an entire battalion base. It was the largest IAF attack in daylight since the last Gaza war in the summer of 2014, codenamed “Protective Edge.”In order to prevent war, both sides hurried to call for help from Gen. Abbas Kamel, the Egyptian intelligence chief, and Nickolay Mladenov, the UN special envoy to the Middle East.The two brokered a ceasefire with terms not really clear nor defined. Thus, that shaky ceasefire was ultimately broken just one week later.This time the reason was surprise sniper fire from Gaza, which killed Israeli soldier St.-Sgt. Aviv Levi, age 20, from the Givati Infantry Brigade, who was on patrol along the border. He was the first fatal Israeli casualty on the Gaza front since the last war.It’s not clear who shot the bullets, who gave the orders and whether they came from the highest Hamas authority or from a local initiative. Regardless, from Israel’s perspective Hamas, which rules the enclave with an iron fist, is the sovereign entity in Gaza and is therefore held accountable for every act of violence against Israeli troops or civilians.A few hours later, Israel fiercely retaliated through a massive IAF attack that targeted 30 Hamas positions, including two battalion bases. A few Hamas terrorists were killed and it was expected that Hamas would continue the vicious cycle of violence by launching a barrage of rockets. But it didn't.Hamas’s restraint that Friday night was a clear indication that it doesn’t want to escalate the situation. Later, Hamas announced that a new ceasefire deal had been reached also due to the good services of Kamel and Mladenov, who is a former foreign minister of Bulgaria.As is a matter of routine, both sides claimed victory and boasted that the other side asked – even begged – for the cessation of hostilities.It will be more accurate to say that in reality, both sides are happy about the ceasefire.Nevertheless, the basic problems – which Hamas’s Gaza, the Palestinian Authority that controls the West Bank, and Israel face – are still alive and kicking.In July 2014, Hamas and Israel found themselves in a war which both didn’t want.It was the third war between the two sides since 2007, when Hamas toppled the PA government by a military coup d’état.The war lasted for 50 days and claimed the lives of 73 Israelis (among them 68 soldiers), one foreign worker and 2,125 Palestinians – more than half of them civilians, including hundreds of women and children.Half a million Palestinians left their homes, which were hit and damaged, or found shelter from the Israeli bombing. Thousands of buildings were destroyed.Israel was showered with 4,500 rockets of various ranges and with mortar shells that caused damage to rural communities, killed livestock and burned fields in the south – with some damage even occurring further north. Dozens of the rockets hit Tel Aviv suburbs, although they caused little damage. The Israeli economy suffered a substantial decline in its production. A few rockets were launched toward the airport and resulted in the suspension of international flights to Ben-Gurion Airport – the major gateway of Israel to the world. The overall cost of the war to the Israeli Finance Ministry was $4 billon.The third Gaza war ended with a ceasefire and understandings that were supposed to bring a long-term solution. It was achieved and agreed upon through indirect talks between Israel and Hamas brokered in Cairo by the Egyptian general intelligence. But from the outset it was clear that both sides showed reluctance to fulfill all their commitments.The major stumbling blocks were:• Israel demanded that Hamas return the bodies of IDF soldiers killed in the war.Later, after the ceasefire, Israel also demanded the release of two Israeli civilians who crossed the border to Gaza and are being held by Hamas. Hamas says it will only do this if Israel releases hundreds of Palestinians terrorists – some of whom have been involved in brutal and deadly killings of Israelis.Israel refuses to make such a deal.• Hamas wants Israel to lift its blockade and allow the flow of billions of dollars for the reconstruction of Gaza. The money is pledged by donor countries – such as Qatar, the United Arab Emirates, Saudi Arabia, the European Union and Japan – with plans to build a power station, a new sewer system and a water desalination station. But Israel set its own precondition: Hamas must first dismantle its rocket infrastructure and stop digging underground tunnels.Thus, the hope for a long-term agreement between the two sides was a non-starter.Nevertheless, with a few exceptions of occasional clashes, the ceasefire had been maintained for nearly 44 months – the longest period of peace for Israeli residents in the area since 1968.But the fragile situation broke down on March 30. Hamas organized what it called the “Great March of Return,” which brought tens of thousands of Palestinians to the border area between Gaza and Israel.Week after week they tried to break through the border fence, causing some damage to the fence itself, to military positions and to heavy machinery.The cabinet instructed the army to prevent, by all means, Hamas’s attempts to penetrate Israel. The IDF responded harshly with an iron fist. Soldiers were deployed along the 66 kilometers of the Gaza border, backed by snipers, tanks, artillery, intelligence posts and drones in the sky.After a month of demonstrations, Hamas failed to achieve its goal. Its protesters failed to cross the border and were stopped, paying a heavy price. Some 150 Palestinians were killed, mainly by the snipers, among them dozens of teenagers. Some 5,000 people were wounded. Israel was criticized by the international community for using disproportional force but felt victorious.Realizing that the tactics of demonstrations and damaging the fence didn’t bring any fruitful dividends, Hamas moved on to a new tactic.Already during the marches on the border, kids were flying kites in the direction of Israel. Hamas commanders jumped on the idea with a clever ploy. They set fire to the kites and flew them to Israel, taking advantage of the summer wind, which blows eastward from the sea.The arson kites began to cause damage to fields, orchards, groves and nature reserves.While Israel managed to find a solution to the new challenge by using drones and laser beams to cut the ropes, Hamas once again outmaneuvered Israel. Parallel to the kites they began flying balloons and condoms, filled with helium gas taken from hospital storages where it was used for MRI and other medical equipment. The gas gives the flying objects an effective boost.The new weapon has proved to be highly destructive, leading to a depressing scene in the fields surrounding Gaza – charred black from the hundreds of fires.The public and media pressure was mounting on the cabinet to respond accordingly.But IDF Chief of Staff Lt.-Gen. Gadi Eisenkot, backed by reports from the IDF chief legal officer, explained to the cabinet that since the balloons and condoms are being launched from shelters far from the border, using a sniper for a precise hit is impossible. At the same time, Eisenkot explained that it would be legally problematic and would probably be internationally condemned, if the army were to fire missiles from drones at the youngsters flying the balloons. Missiles are less accurate, more lethal and the collateral damage would be very high, he explained.But eventually, Eisenkot had no choice but to obey orders from the cabinet, led by Prime Minister Benjamin Netanyahu, who was worried about his public image as a helpless, indecisive and weak leader.Israel began to fire missiles against the shelters and the pads from which the balloons were being launched as well as against the Hamas operatives orchestrating the balloon campaign. Some of them were killed and Hamas in return fired rockets and more shells inside Israel.In the last four months, 500 rockets and mortar shells have been fired. It is wellknown to Hamas that the Iron Dome anti-rocket system can’t intercept the shells if their flying time is relatively short and their distance is short as well.Luckily, these rockets have caused very little physical damage, but have made life for the residents in the region once again unbearable.In July, Israel began to escalate its attacks in Gaza and eventually the brinkmanship policy paid off. Hamas rushed to ask for a ceasefire and promised this time that it would cover everything. Hamas commitments include not to send its activists to cross into Israel, not to damage the fence, not to fly kites, condoms and balloons and not to launch rockets and shells.Israel, in return, is committed to cease its military operation in Gaza. Many military and diplomatic observers doubt very much that the new ceasefire will hold for longer than a few weeks.This is because the basic problems of Gaza and its two million residents, who have been taken as hostage by Hamas – and to a lesser degree Israel – have remained.As long as the two sides do not resolve the basic issues and the stumbling blocks, as long as Gaza will continue to be poor and on the verge of a humanitarian disaster, it will remain a source for war.