JERUSALEM -- Israeli warplanes attacked militant targets in the southern Gaza Strip early Friday in response to a rare rocket attack on the Israeli city of Tel Aviv, as the sides appeared to be hurtling toward a new round of violence.

The rocket attack Thursday night caught the Israeli military off guard and marked the first time that Tel Aviv, some 80 kilometres north of Gaza, has been targeted since a 2014 war. Though the attack caused no damage or injuries, it was a significant escalation and set the stage for a tough Israeli reprisal.

Prime Minister Benjamin Netanyahu called an emergency meeting with his military chief and other top security officials. Shortly after, Israeli warplanes attacked targets in southern and central Gaza.

The blasts were so powerful that smoke could be seen in Gaza City, 25 kilometres away from some of the strikes. The Israeli warplanes could be heard roaring through the skies above Gaza City.

The Israeli military said it was targeting "terror sites" in Gaza, but gave no further details. Palestinian media said naval bases belonging to the ruling Hamas group had been struck. There were no immediate reports of casualties.

Minutes later, the Israeli military reported air raid sirens in southern Israel. It said it had identified a launch attempt out of Gaza, but the rocket misfired and landed inside Palestinian territory.

Israel and Hamas are bitter enemies and have fought three wars since the Islamic militant group seized power in Gaza in 2007. Smaller flare-ups have occurred sporadically since Israel and Hamas fought their last war, in 2014.

The sudden outburst of fighting comes at a sensitive time for both sides. Israel is holding national elections in less than a month. Netanyahu is locked in a tight fight for re-election and could face heavy criticism from his opponents if he is seen as ineffective against the militants.

Cabinet Minister Naftali Bennett, a hardline rival of Netanyahu's, called on the prime minister to convene a gathering of his Security Cabinet and demand the army "present a plan to defeat Hamas."

Likewise, Hamas has come under rare public criticism in Gaza for the harsh conditions in the territory. An Israel-Egyptian blockade, combined with sanctions by the rival Palestinian Authority and mismanagement by the Hamas government, have fueled an economic crisis in the territory. Residents have little desire for another war with Israel.

Earlier Thursday, Hamas police violently broke up a small protest over the harsh living conditions.

Brig. Gen. Ronen Manelis, the chief Israeli military spokesman, said the army had been caught off guard by Thursday night's rocket barrage. He said officials were still trying to determine who had fired the rocket.

Israel holds Hamas responsible for all fire coming out of the territory. Hamas possesses a large arsenal of rockets and missiles capable of striking deep inside Israel.

But with Gaza's economy in tatters, the group has been seeking to preserve calm.

Hamas denied responsibility for the attack on Tel Aviv, saying the rockets were launched when the group's military wing was meeting with Egyptian mediators to try to strengthen a cease-fire with Israel.

In an unusual step that indicated Hamas was attempting to prevent further escalation, the Hamas Interior Ministry said the rocket fire went "against the national consensus" and promised to take action against the perpetrators.

But Israeli's military concluded that Hamas did fire two rockets toward Tel Aviv. In a statement early Friday, the army said "we can confirm" that Hamas carried out the rocket attack.

Islamic Jihad, an Iranian-backed militant group that also has a large rocket arsenal, also denied firing the rockets. Smaller factions inspired by the Islamic State group also sometimes fire rockets, though it is unclear whether they possess projectiles capable of reaching Tel Aviv.

Earlier this week, Israel struck Hamas targets in Gaza in response to rocket fire on southern Israel, near the border. Late Thursday, local media said that Egyptian mediators left the territory.

At the time, Netanyahu issued a warning to Hamas, rejecting suggestions that Israel would be reluctant to take tough action in Gaza ahead of national elections next month.

"I suggest to Hamas, don't count on it," he told his Cabinet. "We will do anything necessary to restore security and quiet to the area adjacent to the Gaza Strip and to the south in general."

------

Akram reported from Gaza City, Gaza Strip.