GAZA (Reuters) - Israeli warplanes bombed Hamas targets in the Palestinian enclave of Gaza early on Friday after Israel’s military said militants had fired two rockets toward the city of Tel Aviv.

The air strikes, the heaviest in five months, hit about 100 military targets belonging to Hamas, the Islamist group which controls Gaza, the military said. These included a rocket manufacturing site, a naval post and weapons facility, and a Hamas headquarters, it said.

Palestinian news media reported strikes throughout the densely populated coastal strip that is home to two million Palestinians. Four people were wounded, health ministry officials said.

The Israeli military accused Hamas of firing rockets from Gaza toward Tel Aviv - the first time the seaside city had been targeted since the 2014 Gaza War.

But Hamas denied responsibility and Israeli media, including Ha’aretz and Channel 7 News, later carried reports that the rockets might have been fired from Gaza by mistake.

A security official briefed on the situation, who declined to be identified by name or nationality, told Reuters the launch was “the result of an error - that an attack on Israel was not intended. Israel holds Hamas responsible, hence the response”.

The exchange was the most serious since a botched Israeli commando incursion into Gaza last November.

In the aftermath of that episode, dozens of Israeli air strikes killed seven Palestinians, at least five of them gunmen, and destroyed several buildings. Rocket attacks from Gaza sent residents of southern Israel to shelters, wounding dozens and killing a Palestinian laborer from the occupied West Bank.

Slideshow ( 14 images )

SIRENS WAIL

The first rocket attack came on Thursday evening, with warning sirens sounding in the Tel Aviv area and residents hearing explosions.

The Israeli military said two longer-range rockets had been fired from Gaza but caused no casualties or damage. The Israelis retaliated in the early hours of Friday.

Just after dawn, six more missiles were fired from Gaza toward Israeli border towns but all but one were intercepted by Israel’s Iron Dome defense system, the military said.

Calm was restored by mid-morning as an Egyptian delegation mediated between Israel and Palestinian factions, a Palestinian official said.

The incident immediately played into the campaign for an election in Israel on April 9 in which Prime Minister Benjamin Netanyahu is seeking a fifth term on the strength of his security credentials.

His right-wing rival, Naftali Bennett, demanded that Israel resume its killings of Hamas chiefs.

“The time has come to defeat Hamas once and for all,” he said on Thursday night.

Netanyahu also faced pressure from his center-left opponent, former General Benny Gantz, who said: “Only aggressive, harsh action will restore the deterrence that has eroded” under the prime minister’s watch.

Slideshow ( 14 images )

Tensions have been high for the past year along the Israel-Gaza frontier, but on Friday morning Palestinian officials canceled the weekly border protests.

Some 200 Palestinians have been killed during the demonstrations that began a year ago and about 60 more have been killed in other incidents, including exchanges of fire across the border. Two Israeli soldiers have been killed by Palestinian fire.

Israel withdrew its troops and settlers from the packed, narrow enclave in 2005 but maintains tight control of its land and sea borders. Egypt also restricts movement in and out of Gaza on its border.

Frustration is growing in Gaza over the dim prospects for an independent Palestinian state. Peace talks between Israel and the Palestinians have been stalled for several years and Israeli settlements in the occupied West Bank have expanded.

The 2014 Gaza War was the third between Israel and Hamas in a decade. More than 2,100 Palestinians were killed in Gaza during that war, most of them civilians, along with 66 Israeli soldiers and seven civilians in Israel.