Palestinians carry a man wounded in an Israeli air strike near Khan Yunis in the Gaza Strip. Photograph: Samuel Aranda/Getty

Israel faces the prospect of a long-term reoccupation of parts of the Gaza Strip after Palestinian rockets for the first time struck a major Israeli city, escalating a crisis that began with the capture of a single soldier.

The Israeli army launched an assault on the Gaza town of Beit Lahiya and reoccupied three former Jewish settlements in response to the attacks on Ashkelon, until now well beyond the range of the rudimentary Palestinian missiles.

Politicians and the army acknowledge that now the tanks and troops are in again it may be politically impossible to withdraw them swiftly even if the captured Israeli soldier, Corporal Gilad Shalit, is freed.

Palestinian rocket attacks on Israeli communities have not killed anyone since Israel pulled Jewish settlers and ground forces out of the Gaza Strip in October. But they have become a huge political embarrassment, in part because of the fear they strike in Sderot, the home town of Israel's defence minister, Amir Peretz, close to Gaza's border.

The rocket attacks are likely to resume once the troops are withdrawn - as has happened in the past - so there is considerable political and military pressure on the government to keep them in Gaza. The mayor of Sderot has called for the destruction of a Palestinian town from which the rockets are fired.

Binyamin Ben-Eliezer, a former defence minister and member of Israeli prime minister Ehud Olmert's security cabinet, said Israel had no intention of returning permanently to the Gaza Strip.

"The entries and exits will take place from time to time. There is no motivation to stay there. We have no interest in returning. We have a simple interest to prevent the continuation of firing at our communities," he said.

But the chairman of the Israeli parliament's foreign and defence committee, Tzahi Hanegbi, said the army could remain in the territory for a long time.

"It could be years. The goal is to prevent high-trajectory fire at Israeli civilians in Israeli communities. If this result is not achieved do you expect that the [Israeli military] will tell the residents of Ashkelon and then southern Ashdod and then Kiryat Gat: look, we tried, and it's not working. So we're going back," he said.

Yossi Alpher, a military analyst and former Israeli intelligence officer, said that the government and military will be trying to avoid becoming entrenched back in Gaza but they will also face political difficulties in extracting the army.

"They are very well aware of the dangers," he said. "But there are catches in trying to leave. The range [of the rockets] can improve further so you have to keep moving south and you move into highly urban areas, and it begins to look like an occupation again."

Mr Alpher said it was possible the government might reach an agreement with the Palestinian leadership that would see Cpl Shalit freed and an end to the rockets - the stated aims of the present Israeli incursion - but without both the army is likely to stay. "Either there is an agreement that gets us out or that presence is expanded," he said. "Then you have the problem you can't get out because you don't have anything to show for it."

The politicians and military agreed early on in the crisis that Cpl Shalit's capture offered the opportunity to curb the firing of Palestinian rockets. Military leaders urged Mr Peretz and Mr Olmert to authorise a large-scale ground invasion deep into the Gaza Strip. But the politicians were cautious, warning the army should be prepared for a long operation that must retain foreign governments' backing.

Cpl Shalit's father, Noam, cautioned against using the capture of his son, in a cross-border raid by Palestinian militias nearly two weeks ago, as a justification for a wider military operation.

"It seems unrealistic to me to say that Israel can restore its deterrent capability at the expense of Gilad," he said. "My son does not have such broad shoulders. If Israel had wanted to regain its deterrent capability, in my humble opinion it ought to have done so before the abduction."

But there are indications of a wider agenda to bury the Hamas-led government. Israel has detained eight Hamas cabinet members and 20 of its MPs, and targeted government infrastructure, including missile attacks on the offices of the prime minister and interior ministry.

"There's a school of thought in the Israeli security establishment that said since the Hamas victory this is going to end up in confrontation and the sooner we pre-empt that conflict the better; remove their leadership, destroy their infrastructure," said Mr Alpher. "That is certainly some of the hidden agenda of this operation but it's not a declared goal. But it could become a declared goal."

Timeline

June 25 Eight Hamas militants seize Corporal Gilad Shalit during raid into Israel from Gaza, the first since Israeli pullout last year

June 28 Israel shells bridges and power plant, and amasses troops and tanks at Gaza's northern border and at Rafah refugee camp in south

June 29 Israeli troops detain one third of Palestinian cabinet and nearly two dozen Hamas lawmakers

June 30 Israeli missile destroys offices of interior minister in Gaza city

July 1 Factions who captured Cpl Shalit demand release of women and children prisoners and further 1,000 captives. Israel rejects demands