Two Israeli soldiers and two Palestinians were killed Friday as fierce fighting continued along the border separating the Gaza Strip and Egypt, according to Israeli army and Palestinian security officials.

The fourth straight day of clashes intensified the debate in Israel over whether to withdraw the army and 7,500 Jewish settlers from Gaza. Newspaper headlines and television broadcasts drew parallels between Gaza and Lebanon, where growing disaffection among Israelis with army casualties compelled the government to withdraw its forces four years ago after an occupation of nearly two decades.

Army bulldozers demolished at least nine more houses near the Philadelphi corridor, a military patrol road running between the Rafah refugee camp and the Egyptian border that Palestinian militants use to smuggle arms and other contraband. Five soldiers were killed there Wednesday when their armored personnel carrier was hit by a homemade rocket.

Army officials have announced plans to demolish hundreds of structures near the road to remove potential firing positions in what has become a gutted wasteland where hundreds of refugees once lived.

"We're not talking a shot here or there," Capt. Jacob Dallal, an army spokesman, said. "We are talking very extensive fire where the militants take over a building and shoot to their heart's desire, and that has become a combat threat and the context that today's demolitions came in."

The deaths on Friday raised the toll over the past four days to 13 Israeli soldiers and 29 Palestinians, an unusually high total reflecting the intensity of the fighting. At least 150 Palestinians have been wounded, and witnesses said many residents had been trapped in their homes for three days.

According to an army statement, the incident on Friday occurred when soldiers were attempting to secure the area while other troops worked to recover the remains of the five soldiers, who had been killed Wednesday. A sniper shot and killed a soldier who had taken up a position in a house and was trying to assist an elderly Palestinian seeking to enter with heavy baggage. When fellow troops sought to rescue him, they were also shot at. One was killed and two others wounded.

Gaza officials said one Palestinian was killed during an Israeli missile strike and a second died when he tried to infiltrate a Jewish settlement. Eight others were reported wounded, two of them seriously.

The renewed fighting came as funerals were held for three of the soldiers killed Wednesday. Meanwhile, Israel's two largest newspapers, Yedioth Aharonoth and Maariv, published polls reporting strong public support for withdrawal. Maariv's survey found that 40 percent of those polled wanted to leave Gaza immediately, with or without an agreement with Palestinians, while another 39 percent were prepared to pull out with an agreement. Yedioth's poll found that 71 percent of those surveyed favored leaving unilaterally.

Prime Minister Ariel Sharon proposed a pullback from Gaza, but his Likud Party voted down the plan two weeks ago in a nonbonding referendum. Sharon has pledged to bring forth a new plan by the end of the month.

Special correspondent Islam Abdulkarim in Gaza City contributed to this report.

An Israeli armored bulldozer demolishes a building in a violent section of the Gaza Strip near the Egyptian border.