The Israeli military carried out its largest airstrike campaign in Gaza since the 2014 war on Saturday, as Hamas militants fired dozens of rockets into Israel throughout the day, threatening to trigger an all-out war after weeks of growing tensions along the volatile border.Two Palestinian teenagers were killed in an airstrike in Gaza City, while three Israelis were wounded from a rocket that landed on a residential home.Israel said it was focused on hitting militant targets and was warning Gaza civilians to keep their distance from certain sites. But even before the report of casualties the intense tit-for-tat airstrikes and rocket barrages still marked a significant flare-up after a long period of a generally low-level, simmering conflict."The Israeli army delivered its most painful strike against Hamas since the 2014 war and we will increase the strength of our attacks as much as necessary," Prime Minister Benjamin Netanyahu said.Ceasefire Late on Saturday, Hamas and Islamic Jihad militants in Gaza announced that they had agreed to a ceasefire brokered by Egypt, but sirens warning of incoming rockets still wailed in southern Israel early on Sunday and it was unclear if the ceasefire was holding.Lieutenant Colonel Jonathan Conricus said the latest Israeli sortie, the third of the day, struck some 40 Hamas targets including tunnels, logistical centres and a Hamas battalion headquarters. He said the escalation was the result of the sustained Hamas rocket attacks, its fomenting of violence along the border and its campaign of launching incendiary kites and balloons that have devastated Israeli farmlands and nature reserves."Our message to Hamas is that we can and will enhance the intensity of our effort if needed," he said. "What Hamas is doing is pushing them ever closer to the edge of the abyss ... Hamas will have to understand that there is a price to be paid."Later, witnesses reported that Israeli warplanes dropped four bombs on an unfinished building near a Hamas police and security compound in Gaza City, reducing the old structure to rubble. The four-storey building is adjacent to a public park. Gaza's Health ministry said two teenagers were killed in the strike and ten others injured.It marked the first casualties of the day. Striking in the heart of Gaza City is typically only seen during full-blown conflicts like the 2014 war and could signal that a further escalation may be in store.The Israeli military had no immediate reaction to that strike but said it had targeted a separate high-rise building in the northern Gaza Strip that was used as a Hamas urban warfare training facility. It said a tunnel was dug under the building.Shortly after, Israeli medical officials said three Israelis were wounded from a rocket that landed on a house in southern Israel. It said paramedics in the southern city of Sderot were treating a 52-year-old man with a chest wound, a 17-year-old girl with a face wound and a 20-year-old woman with injuries to her limbs.SirensSirens wailed overnight and throughout most of the day on Saturday in southern Israel as waves of rockets and mortars were launched from Gaza amid the airstrikes. The military said it identified about 60 launches of rockets and mortars from Gaza toward Israeli territory, of which about 10 were intercepted by the Iron Dome aerial defence system. As a precaution, the military shut down a popular beach in southern Israel and placed limitations on gatherings of large crowds. Israeli police says four of the projectiles caused damage.Israel has been warning Hamas in recent weeks that while it has no interest in engaging in the kind of conflict that led to the sides fighting three wars over the past decade, it will not tolerate Gaza militants' continued efforts to breach the border and its campaign to devastate Israeli border communities with incendiary attacks.With Israel focused on rising tension along its northern border in its efforts to prevent Iran from establishing a permanent military foothold in post-civil war Syria, it has been wary of escalating hostilities in Gaza. But Netanyahu has also come under pressure to act from southern Israeli communities, who have once again found themselves under rocket fire from Gaza in addition to contending with the daily field fires."We are ready to operate simultaneously in different theatres," Conricus said, referring to the dual threats from Syria and Gaza. "It will be challenging to fight on more than one border but it is something we can do and are prepared to do."Israel's military chief visited the border area for briefings and the Security Cabinet, Israel's top decision-making body, is expected to convene on Sunday to discuss further actions.Friday protestOn Friday, thousands of Palestinians gathered near the Gaza border for their near-weekly protest. A 15-year-old Palestinian who tried to climb over the fence into Israel was shot dead. Later the military said an Israeli officer was moderately wounded by a grenade thrown at him.Gaza's health ministry said on Saturday that a 20-year-old struck by gunfire on Friday during the protests in the southern Gaza Strip had also died of his wounds.The Islamic militant group Hamas that rules Gaza has led border protests aimed in part at drawing attention to the Israeli-Egyptian blockade imposed after Hamas took control of Gaza in 2007. The demonstrations have been fuelled in large part by pervasive despair caused by the blockade, which has caused widespread economic hardship.Over 130, mostly unarmed, Palestinians have been killed by Israeli fire since protests began on March 30.Israel says it is defending its sovereign border and accuses Hamas of using the protests as cover for attempts to breach the border fence and attack civilians and soldiers. Most recently, it has been struggling to cope with the widespread fires caused by the incendiary kites and balloons floating over the border.In a statement, the military said Hamas' activities "violate Israeli sovereignty, endanger Israeli civilians and sabotage Israel's humanitarian efforts that aim to help Gazan civilians."In a relatively rare admission, Hamas said it fired the rockets to deter Israel from further action. Most of the recent rockets from Gaza have been fired by smaller factions but Hamas spokesperson Fawzi Barhoum said it was an "immediate response" that was meant to "deliver the message."The military said its jets targeted two Hamas tunnels as well as other military compounds, including those involved in the production of the kites and balloons. It said the Hamas battalion headquarters in northern Gaza was completely destroyed and footage it released showed a series of large explosions that left a gaping hole in the ground.