Unidentified gunmen dragged a judge from the governing Hamas Islamist movement out of a taxi and shot him dead in front of his courthouse in Gaza on Wednesday, increasing fears of a Palestinian civil war.
The possibility of redoubled Israeli-Palestinian violence also loomed, with Israeli troops killing a Gaza gunman on the boundary fence in the first such incident since a November 26 truce.
Hamas said the slain judge, Bassam al-Fara, belonged to its armed wing. The death came two days after gunmen killed three young sons of a Gaza intelligence chief linked to Hamas's rival faction Fatah, which is headed by President Mahmoud Abbas.
Witnesses who declined to be identified told the agency that the gunmen had eaten breakfast in a nearby restaurant in the town of Khan Younis while waiting for Fara, 28, to arrive.
They shot him at point blank range after pulling him from the car.
Hamas-Fatah violence has spiralled in Gaza and the occupied West Bank after attempts to form a coalition government failed.
Some Abbas aides have said he might use a speech on Saturday to call early elections to break the deadlock and ease Western sanctions imposed on the government because of Hamas's refusal to recognise Israel and renounce violence.
Abbas and Israeli Prime Minister Ehud Olmert declared a Gaza ceasefire last month in a bid to ease tensions and restart talks on ending a more than 6-year-old Palestinian revolt.
Wednesday's shooting of a Fatah gunman by troops who spotted him nearing the boundary fence marked the first killing in Gaza by Israeli forces during the truce.
Gaza militants have fired almost daily rocket salvoes into Israel, but caused no damage.
"Let the calm go to hell," the dead gunman's group said in a statement. "We promise that our coming reaction will be in the heart of our occupied land."
Militants had previously threatened to abandon the truce over deadly raids by Israeli forces in the West Bank, but a major flare-up would be unlikely without Hamas's agreement.
Abbas, a cautious leader, is probably reluctant to stoke tensions with dramatic announcements at a time when emotions run high.
Abbas aides said that, whatever his declarations on Saturday, he would likely leave the door open to internal talks.
Hamas, which accuses Fatah of trying to topple its government, blamed Fara's killing on a Fatah "death squad".
"The seekers of the coup in Fatah bear the responsibility for all actions of chaos taking place in the Palestinian streets," senior Hamas politician Mushir al-Masri told the agency.
Fatah denied responsibility, but accused Fara of having been involved in the killing of one of its Gaza activists in October.
At least 10,000 people marched in Fara's funeral procession in Khan Younis. Hamas activists vowed revenge, shouting: "The servants of darkness will be found, stepped on and crushed."
Earlier, some 2,000 Fatah gunmen marched to the president's Gaza City office and urged him to sack the government over the collapse in law and order. Before arriving, they blocked roads and fired automatic weapons into the air.