The army said that its targets had included an office complex in Gaza City used to plan and command Hamas militant activities.

Israeli warplanes on Friday struck some 100 Hamas targets in the Gaza Strip in response to a rare rocket attack on the Israeli metropolis of Tel Aviv. Rocket fire persisted into the morning, setting the stage for additional possible reprisals.

The army said that its targets had included an office complex in Gaza City used to plan and command Hamas militant activities, an underground complex that served as Hamas’ main rocket-manufacturing site, and a centre used for Hamas drone development.

In Gaza, health officials reported four people wounded, including a husband and wife in the southern town of Rafah. There were no further details. The office building struck by Israel had been used by Hamas’ office of prisoner affairs.

The sudden outbreak of violence comes at a sensitive time for both sides, and it appeared that Israel and Hamas had incentives to end the fighting.

Israeli prime minister Benjamin Netanyahu is in the midst of a tight re-election battle. A tough response would draw international criticism and domestic accusations that he is acting out of political motivations ahead of the April 9 vote.

But a restrained response will draw criticism from his fellow hard-line rivals.

Hamas, meanwhile, is coping with its own domestic troubles. Israel and Egypt have maintained a crippling blockade on Gaza since Hamas took over the territory in 2007. The blockade, along with sanctions by the rival Palestinian Authority and Hamas’ own mismanagement, have fueled an economic crisis that has driven unemployment over 50 per cent.

Shortly before the rocket attack, Hamas police on Thursday violently broke up a rare protest by demonstrators angry about the dire living conditions in Gaza.

The crackdown triggered heavy criticism on social media, raising the possibility that the rocket fire was a diversionary tactic. The organisers of a weekly protest along the Israeli border said they would cancel the demonstration in the wake of the escalation.

The fighting came as Egyptian mediators were trying to extend a ceasefire between the bitter enemies, which last fought a war in 2014. The Egyptians left Gaza late on Thursday.

Hamas, which typically claims responsibility for its military actions, denied involvement in the rocket attack on Tel Aviv and even said it had undermined its interests. But Israel’s military said it had concluded the group was behind the attack. “The IDF holds the Hamas responsible for all events transpiring in the Gaza Strip and emanating from it,” the military said in a statement.

The late-night attack on Thursday on Tel Aviv, Israel’s densely populated commercial and cultural capital, marked a dramatic escalation in hostilities. It was the first time the city had been targeted since a 2014 war between Israel and Gaza.

Following the first Israeli air strikes, several additional rounds of rocket fire were launched into Israel. The military said several rockets were intercepted by its air defence systems, and there were no reports of injuries.

The initial blasts from the Israeli air strikes in southern Gaza were so powerful that smoke could be seen in Gaza City, 25 kilometres to the north. The Israeli warplanes could be heard roaring through the skies above Gaza City.

Israel and Hamas are bitter enemies and have fought three wars since the Palestinian group seized power in Gaza in 2007.