Brigadier General Ronen Manelis, the Israeli army’s chief spokesman, said officials had no prior warning of the attack.

Israel holds Gaza’s Hamas rulers responsible for all fire out of the territory.

Hamas denied responsibility for the attack, saying the rockets were launched when the group’s military wing was meeting with Egyptian mediators to try to strengthen a cease-fire between Gaza militants and Israel.

Tel Aviv mayor Ron Huldai said he had ordered the city to open public air raid shelters as a protective measure.

But he said there were no special instructions and encouraged residents to stick to their daily routines.

Gaza is controlled by Hamas, an Islamic militant group that seeks Israel’s destruction.

Israel and Hamas have fought three wars since Hamas sized control of Gaza in 2007.

Hamas possesses a vast arsenal of rockets and missiles, but it has sought to contain violence with Israel since the last war in 2014.

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 Egyptian mediators who were in Gaza trying to strengthen a ceasefire between Gaza militants and Israel left the territory.