Israel’s prime minister Benjamin Netanyahu said that continued rocket fire from Gaza is making another war against Palestinian militants in the coastal strip inevitable, his latest headline-grabbing announcement just days before he seeks re-election.

Mr Netanyahu said advanced plans were in place to strike Gaza and that he would decide the optimal timing of the offensive, given the unwillingness of Gaza’s Hamas rulers to stop the daily barrages.

The recent attacks have caused no casualties.

The Israeli military has responded with limited strikes against Hamas installations that have caused no casualties and little damage, and has refrained from risking a larger conflagration as Israelis prepare to head to the polls.

The Israeli leader has been criticised for failing to respond harshly to the rockets, which have sent residents of southern Israel racing for cover.

Israel Elections
A massive election campaign billboard of the Likud party shows Israeli prime minister Benjamin Netanyahu, right, and US President Donald Trump (Oded Balilty/AP)

Mr Netanyahu, who counts on the working-class, Gaza border towns as part of his electoral base, was himself whisked away by bodyguards from a campaign event on Tuesday when Palestinian militants fired rockets toward the area.

Israel withdrew from the Gaza Strip in 2005 and Hamas militants seized power two years later.

Israel and Hamas have fought three wars and engaged in several other rounds of violence over the past decade.

“I do not wage war unless it is a last resort and I don’t risk the lives of our soldiers and citizens just to get applause,” Mr Netanyahu said in an interview with Kan Reshet Bet Radio.

“We will probably have no choice but to set out on a big campaign, a war against the terror forces in Gaza.”

“I won’t start it one minute before we are ready, and we are preparing for a ‘different war’,” he added, shortly before flying to Russia for a meeting with President Vladimir Putin.

It was Mr Netanyahu’s first major interview with a mainstream media outlet in a frenetic campaign in which he has been dictating the agenda with a dizzying array of manoeuvres.

Just this week, he alleged fraud in Arab voting areas, without providing any evidence, and pushed for legislation to place cameras in polling stations on election day.

Israel Elections
A worker hangs a massive election campaign billboard that shows the Blue and White party leader Benny Gantz (Oded Balilty/AP)

He also claimed to have located a previously unknown Iranian nuclear weapons facility and vowed to annex the heart of the West Bank if he wins re-election.

His pledge to extend Israeli sovereignty over the Jordan Valley sparked international condemnation.

Stephane Dujarric, spokesman for the UN secretary-general, said it would be a “serious violation of international law”.

Jordan, one of only two Arab states to have reached a peace agreement with Israel, condemned Mr Netanyahu’s “catastrophic” announcement.

“It will not only undermine the two-state solution, which the whole world sees as the only path toward resolving this conflict, but it will kill the whole peace process,” foreign minister Ayman al-Safadi said.

Saudi Arabia, a regional power that has grown closer to Israel in recent years, also condemned the move.

Mr Netanyahu said it was important to act now as President Donald Trump prepares to unveil his Mideast peace plan after the elections next Tuesday in Israel.

The move was widely viewed in Israel as Mr Netanyahu’s latest stunt to draw in right-wing voters in a hard-fought campaign.

In a statement issued on Wednesday evening, the Russian Foreign Ministry said it took note of Mr Netanyahu’s announcement and the “highly negative reaction in the Arab world”.

It said it would share its concerns with Israel since “implementation could trigger a sharp escalation in the region and undermine hopes for establishing a lasting peace between Israel and its Arab neighbours.”

Prior to his departure to Sochi, Mr Netanyahu said the focus of his talks with Mr Putin would be to promote the “joint goal” of removing Iranian forces from neighbouring Syria.

Mr Netanyahu and Mr Putin have met regularly in recent years to coordinate military activities in Syria.

Mr Netanyahu has for years argued for aggressively countering Iran’s nuclear program and its regional activities, and often takes pride in having a strong working relationship with both Mr Putin and Mr Trump.

However, Mr Netanyahu’s clout in Washington appeared to take a hit this week with the firing of one of his like-minded allies in the administration, ex-national security adviser John Bolton, amid reports that Mr Trump was considering meeting with Iranian President Hassan Rouhani and easing sanctions against Iran.

In his radio interview, Mr Netanyahu defended his record.

“Where did this strong sanctions policy against Iran come from if not from the struggle that I led? Indeed, I have had influence on Trump,” he said.

“You can’t tell the president of the United States with whom he should meet, but there is not one person who has influenced more, and continues to influence, the aggressive stance against Iran than me, and everyone knows that.”