BEIT HANOUN, Gaza Strip — Women collapsed in grief, a man hoisted his dead baby aloft and tens of thousands of Palestinians called for revenge Thursday as they jammed a cemetery for the funeral of 18 civilians killed in an errant Israeli artillery attack.

Despite the deadly incident, Israel said it would keep attacking Gaza as long as Palestinian rocket barrages persist, although the army ordered artillery fire to stop pending the results of an investigation.

Amid the anguish, Palestinian President Mahmoud Abbas called his main political rival, Hamas’ supreme leader Khaled Mashaal — a move that could help prevent the Islamic militant group from renewing attacks on Israel and pave the way for a moderate Palestinian government.

The shells landed Wednesday as residents were sleeping in the northern Gaza town of Beit Hanoun, and witnesses said many were killed as they fled their homes in panic.

Highest civilian toll in 6 years
The 18 dead was the highest Palestinian civilian toll in a single incident since the current conflict erupted in September 2000. The highest toll of Israeli civilians was 29 killed in a Palestinian suicide bombing at a Passover gathering in March 2002.

The army said it was targeting areas where rockets had been fired in recent days at the Israeli cities of Sderot and Ashkelon.

The Israeli army said Thursday that an investigation indicated the casualties were caused by a technical failure in the fire control system of an artillery battery, the first official military confirmation that army shellfire was responsible.

The statement said the shells were fired in response to Palestinian rocket attacks on Israel and the head of the army has suspended artillery fire into Gaza pending a further technical and operational investigation.

Olmert: ‘The military will continue’
Olmert, however, said Israel will keep targeting Palestinian rocket squads in Gaza despite the risk of inadvertently hitting civilians. He indicated Israel would keep up airstrikes even as the artillery falls silent.

“The military will continue as long as there will be Qassam shooting,” he said, using the name for Hamas’ homemade rockets.

“We will take precautions in order to avoid unnecessary mistakes,” he added. “We will do everything in our power to avoid it. I think it would not be serious to promise that it may not happen. It may happen.”

While taking a tough line toward militants, Olmert appealed to Abbas for dialogue.

“I’m ready anytime, anyplace, without preconditions and he will be surprised when he will sit with me, of how far we are prepared to go,” Olmert said at an economic conference in Tel Aviv. “I can offer him a lot.”

Abbas has agreed in principle to meet Olmert, but he wants to ensure concrete results. Meetings between officials of the two sides have been held off and on for months, with no conclusions.

At the United Nations, the Security Council held a special session Thursday to discuss an Arab-backed resolution demanding the withdrawal of Israeli troops from the Gaza Strip and condemning the recent Israeli attacks. The resolution, introduced by Qatar, also calls for a mutual cease-fire and the deployment of a U.N. observer force on the Israeli-Gaza border.

Several diplomats from the U.S. and other council nations expressed concern at the contents of the resolution, noting that it makes no mention of Palestinian rocket attacks into Israel.

The head of the Arab League, Amr Moussa, also called an emergency meeting of Arab foreign ministers in Cairo, Egypt, on Sunday to forge a response to the Israeli offensive.

‘I will avenge!’
The bodies arrived at the cemetery in Beit Hanoun a convoy of 18 ambulances, which drove from the hospital through the artillery-scarred cluster of apartment buildings. Cries of “God is greater than Israel and America,” punctuated by gunshots, rang out as the dead were carried out on stretchers.

“I will avenge, I will avenge!” screamed one of the victims’ relatives as he fired his weapon, voicing a common sentiment among the mourners.

“The Zionist enemy understands only the language of force and therefore I say, ’An eye for an eye, a nose for a nose,”’ chanted Abdel al-Hakim Awad, a Fatah spokesman.

The freshly dug graves were lined up in a single row, each marked by a concrete block. A Palestinian flag fluttered over each one.

Two Israeli unmanned aircraft buzzed overhead.

All from one family
All the dead belonged to the al-Athamnas, a prominent family in town that includes several doctors and professionals. Relatives said they had fled during the recent Israeli offensive, returning home after Israeli ground forces pulled out Tuesday.

Abbas and Mashaal, who lives in exile in Syria, agreed to meet after a deal is reached on a new government of experts, to be appointed by Hamas and Abbas’ Fatah movement, said a senior Palestinian official who sat in on the conversation.

Both sides hope that such a government will be acceptable to the West and end a crippling international aid boycott imposed for Hamas’ refusal to renounce violence and recognize Israel.

Abbas had refused to talk to Mashaal since April, when the Hamas leader harshly criticized the moderate Palestinian president in a speech. However, with violence threatening to escalate after the Beit Hanoun strike and militants calling for revenge, he contacted Mashaal to try to lock up a coalition deal. A key sticking point is the choice of a new prime minister who has ties to Hamas but also would be acceptable to the West..