Tens of thousands of grieving Gazans, weeping in anguish and screaming for revenge, crammed into a cemetery on Thursday to bury 19 civilians killed by an errant Israeli artillery barrage that tore through a crowded residential neighborhood.

The emotional throngs reached toward the sky or collapsed in grief as a despondent father carried the lifeless body of his 1-year-old baby in his arms. About 20 gunmen fired sporadically into the air, and many mourners waved the yellow flags of Palestinian President Mahmoud Abbas' Fatah party.

The cemetery, which had been under construction, was hastily opened to accommodate the victims because no other cemetery in town had enough land to allow the victims to be buried together. All of the dead belonged to a single extended family.

The bodies arrived in a convoy of ambulances, which brought them from hospital morgues through the artillery-scarred cluster of apartment buildings. Cries of "God is greater than Israel and America," punctuated by gunshots, rang out as the bodies were brought 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 residents of Sderot, the residents of Ashkelon, even the residents of Tel Aviv, are not going to enjoy security or peace as long as you are suffering, our beloved people in Beit Hanoun."

Visit FOXNews.com's Mideast Center for more in-depth coverage.

The freshly dug graves were lined up in a single row, each marked by a concrete block. A Palestinian flag fluttered over each grave. Two Israeli unmanned aircraft buzzed overhead.

Beit Hanoun has been the focus of a week-long Israeli offensive meant to halt rocket attacks on southern Israel. Wednesday's deadly shelling came 24 hours after Israeli ground forces pulled out of Beit Hanoun. The bloodshed, and calls for revenge by militant groups, have raised fears of a new wave of fighting with Israel.

The shells landed as residents were still asleep, and witnesses said many were killed as they fled their homes in panic. The bombardment was the deadliest on Palestinian civilians in the past six years of fighting, and undermined Abbas's attempts to form a more moderate government and renew peace talks with Israel.

A number of the dead belonged to the al-Athamnas, a prominent family in town that includes several doctors and professionals. Family members said they had fled during the recent Israeli offensive, returning home after Tuesday's pullout.

Amid the anguish, Abbas picked up the phone and 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 also pave the way for a moderate Palestinian government.

Abbas and Mashaal, who lives in exile in Damascus, Syria, agreed to meet after agreement has been reached on a new government of experts, to be appointed by Hamas and Fatah, 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.

Israeli military officials said the artillery was aimed at a target about 500 yards away. A top commander said artillery aiming devices had malfunctioned, though a formal investigation was still under way.

Israeli Prime Minister Ehud Olmert expressed regret for harming civilians and said the errant shelling was caused by a "technical failure."

Olmert, speaking in English to Sky TV, expressed regret for the bloodshed. "I'm very uncomfortable with this event. I'm very distressed," he said, adding he had personally looked into the cause of Wednesday's pre-dawn artillery strike.

"This particular case ... was a mistake. It was not a planned attack" he said. "It was a technical failure of the Israeli artillery. I checked it, and I verified it."

He added, however, that Israel will continue its military operations in Gaza as long as Palestinian rocket attacks persist. He said Israel will do everything it can to avoid similar mistakes, but warned that further tragedies are possible. "It may happen," he said.

The funeral procession set out from two sites, because none of the area hospitals — already taxed by casualties from the Israeli offensive — was able alone to keep that number of dead in their morgues. Ambulances set out from Kamal Adwan hospital in Beit Lahiya and from Shifa Hospital in Gaza City.

The convoys met at the entrance to Beit Hanoun and entered together. Sirens screamed, and people standing on both sides of the street cried, "God is Great," and "God, we want to avenge," as gunmen fired in the air.

All activity in Beit Hanoun was focused on the funerals. Ordinarily, on a Thursday morning, the town's streets are teeming with people. In the hours before the funeral, the streets were all but deserted.

A three-day mourning period declared by Palestinian leaders kept shops shuttered.

Khadra Abu Shabat, 55, said sadness mingled with worry on an emotionally charged day.

"All of us are feeling sad, and worried, too," said Abu Shabat, tears streaming down her face. "We are going to bury this family and ask ourselves, 'Who's next? Me? My grandchildren? My neighbor?"'

The bloodshed provoked Palestinian threats of a new wave of violence. Mashaal canceled Hamas' a cease-fire with Israel that has largely held since February 2005, raising the specter of renewed suicide bombings.

Hamas' military wing also called for attacks against American targets — an appeal that Hamas political leaders in Gaza did not endorse. U.S. President George W. Bush called for restraint on all sides Wednesday.

Abbas condemned the "terrible, despicable crime," and the international community harshly criticized the deaths. The U.N. Security Council was to meet in special session later Thursday. Palestinians hoped for a condemnation of Israel, on top of the denunciations Israel absorbed from governments worldwide after the attack.

Arab foreign ministers scheduled an emergency meeting for Sunday in Cairo to discuss a common response to the Israeli offensive in Gaza that has killed more than 50 people in the past week.

Arab League Secretary-General Amr Moussa said he called for the meeting at the request of Palestinian and Lebanese officials to "look into practical steps and measures to deal with the Israeli ongoing and recurrent aggression on the Palestinian people, latest of which is the Beit Hanoun massacre."

Israeli police, fearing revenge attacks, stepped up their alert level, mobilizing forces across the country.

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 Israelis was 29 killed in a Palestinian suicide bombing at a Passover gathering in March 2002.

Visit FOXNews.com's Mideast Center for more in-depth coverage.