A mass memorial service for the late Palestinian leader Yasser Arafat was interrupted. Hamas security forces opened fire forcing demonstrators to flee in panic during the largest show of force by the rival Fatah movement since Hamas seized control of the Gaza Strip in June.
At least six people were killed and 85 wounded, medical officials said - the deadliest showdown in Gaza since Hamas' takeover.
More than 250,000 Fatah supporters joined Monday's rally in a major square of Gaza City. As shots were fired, protesters scrambled for cover and masked Hamas security men ran through the city streets firing weapons.
Bodyguards of senior Fatah officials were seen covering their bosses and dragging them out of the rally grounds.
Two hours later, hundreds of Hamas gunmen were in control of the protest site. Hundreds of protesters were still in the area, trying to get out. Hamas men were seen arresting protesters, and sporadic gunfire could be heard.
An eyewitness, identifying himself as Abu Samir, said Hamas security men appeared to fire unprovoked. "I saw brutality. I saw gunmen shoot at people. I saw them catch a boy and beat him with a stick," he said.
Palestinian President Mahmoud Abbas' office denounced Hamas' actions as a "heinous crime."
Hamas officials accused Fatah of provoking the violence. Hamas has ruled Gaza with an iron grip, rounding up Fatah supporters, confiscating weapons and barring many large public gatherings.
"Before the rally, Fatah militants were deployed throughout the area," said Ehab Ghussen, spokesman for the Hamas-controlled Interior Ministry. "Fatah is responsible for continued incitement against the Palestinian police, and there was a clear attempt to bring back chaos."
After keeping a low profile in recent months, Fatah supporters came out en masse for Monday's rally. An international boycott of Hamas has devastated the already depressed Gazan economy, and public pressure against the government has been mounting.
Demonstrators waved Palestinian and yellow Fatah flags, and huge posters of Arafat hung from buildings in the area. People arrived on bicycles and donkey carts, snarling traffic in downtown Gaza City.
"Whoever thinks that Fatah is dead, let him come and see Gaza today. Gaza is all Fatah," Ahmed Heles, a senior Fatah official, told the rally.
Fatah organizers said Hamas security prevented busloads of Fatah supporters from reaching Gaza City from southern towns. There were Hamas checkpoints on the road to the rally.
The violence started when a group of Fatah supporters behind the courtyard came under fire, apparently after throwing stones at the security compound in the area.
Hamas said Fatah gunmen had taken position on the rooftop of a building near the rally site. There were no Fatah gunmen visible on the streets during the clashes, though earlier, a handful of Fatah militiamen were turned away from the rally by event organizers.
The Gaza takeover has left the Palestinians with two rival governments - Hamas' regime in Gaza, and a moderate government led by Abbas in the West Bank.
Israel and the international community has welcomed Abbas' pro-Western government, while driving the Hamas regime into deep isolation.
Abbas has been using the third anniversary of Arafat's death to rally support on the Palestinian streets ahead of a U.S.-hosted peace conference this month.
By portraying himself as Arafat's heir, Abbas is trying to harness Arafat's iconic status among Palestinians.
Moving to bolster Abbas, Israeli Prime Minister Ehud Olmert said he would release more than 400 Palestinian prisoners before the U.S. conference. Israel holds more than 8,700 Palestinian prisoners for so-called security crimes and most Palestinians have at least one relative among them - making prisoners one of the conflict's most emotionally charged issues.
Olmert also said he was confident he could reach a final peace agreement with Abbas, telling lawmakers "it is not impossible to bridge the gaps."
Israel and the Palestinians hope the conference will be a springboard for relaunching peace talks, which broke down in violence seven years ago.