But according to other accounts, the five victims were members of the Fatah-affiliated Preventive Security force.
Gunmen from the hardline Islamist group also fired barrages of rockets at Israeli towns, an apparent attempt to draw Israel into the internal Palestinian conflict that has sent the coastal territory spiraling into chaos.
At midday Wednesday, policemen from the Preventive Security organization arrested five Hamas men and were driving them through Gaza City when the vehicle was ambushed by Hamas fighters, Preventive Security officials said.
Five of the Hamas men were killed, along with two Fatah men, they said. The exact circumstances of the incident were not immediately clear.
Hamas radio reported that a Hamas man was killed in another clash, and a nurse traveling in an ambulance was shot in the head after being caught in the crossfire, hospital officials said. Her family said she was brain dead and being kept alive by a respirator.
In four days of fighting, 41 people have been killed and dozens more have been injured. The majority of the fatalities have been from Fatah.
Rocket fire at Israel
Fighting raged close to Palestinian President Mahmoud Abbas' heavily guarded compound Wednesday morning, which was also targeted by Hamas mortar fire overnight, and the bodies of two Fatah gunmen could be seen sprawled on the street nearby.
Abbas, a moderate from Fatah, was not present.
Chaos in Gaza (Photo: AFP)
Early Wednesday, Hamas gunmen fired mortars and pipe bombs at the home of Fatah security chief Rashid Abu Shbak, before storming inside and killing six bodyguards, Palestinians security and medical officials said.
Abu Shbak and his family were not home at the time of the attack, but the house was guarded by at least a dozen of his bodyguards. Dozens of reinforcements from the Preventive Security organization, which Abu Shbak used to head, were sent in to join the fighting.
Abdel Hakim Awad, a Fatah spokesman, angrily accused Hamas' leadership of the attack on Abu Shbak's house.
"All (Hamas) are killers from top to bottom, all are implicated," he said, charging that the Islamist group "wanted to turn Gaza into a new Somalia or Darfur."
Hamas officials said the organization's men launched eight rockets at Israel on Wednesday, following a barrage of around 20 rockets a day earlier.
On Wednesday morning, Israeli aircraft fired at open areas in northern Gaza in an attempt to deter Palestinian rocket squads, a military spokesman said.
Ali Waked contributed to this report