The Israeli military says it has begun attacking sites in the Gaza Strip in response to a rocket attack on Tel Aviv.

The attacks were taking place in the southern Gaza town of Khan Younis, about 15 miles south of Gaza City.

The warplanes could be heard flying overhead in Gaza City, where smoke from the explosions could be seen in the distance.

In a statement the army said it was targeting “terror sites”. It gave no further details.

Palestinian media said a Hamas naval base had been targeted.

There were no immediate reports of injuries.

Israel Gaza
An explosion is seen on Gaza City (Adel Hana/AP)

The attacks came after Palestinian militants in the Gaza Strip fired two rockets towards Tel Aviv, the Israeli military said.

The rocket barrage triggered air raid sirens throughout the city, Israel’s densely populated commercial and cultural capital.

No damage or injuries were reported. But it marked the first time that Tel Aviv, some 50 miles north of Gaza, has been targeted by rocket fire since a 2014 war with Gaza militants.

Israeli Prime Minister Benjamin Netanyahu conferred with senior army officials to discuss a response.

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.