More than 40 people were also reported wounded in the fighting on Sunday evening, the first such incident since Israel withdrew from Gaza last month, witnesses said.
Both sides accused the other of sparking the confrontation, which appeared to be the worst between Palestinian factions since late July.
Aljazeera reported Palestinian security sources as saying the incident started when a police patrol came across two people fighting at an ATM machine. When the security forces intervened, one of the men called for Hamas assistance and a grenade was thrown.
A Hamas spokesman in Lebanon, Usama Hamdan, gave a different account. He told Aljazeera that fighting broke out when the police came to arrest Muhammad Abd al-Aziz al-Rantissi, the son of the late Hamas leader Abd al-Aziz al-Rantissi, who was assassinated by Israel in 2004.
Accounts of what started the
According to Hamdan, the police beat al-Rantissi, people in the neighbourhood gathered to protect him, and the police opened fire indiscriminately to disperse the crowd. Al-Rantissi was unarmed when the police approached him, Hamas said.
Police said they had arrested one Hamas member and that their forces had been put on high alert.
Fighting quickly spread to the nearby Shati refugee camp where Hamas members shot four rocket-propelled grenades at a Palestinian police station, killing the policeman, and another at police in Shaikh Radwan, a Hamas stronghold in Gaza City.
The fighting spread to a nearby
Aljazeera correspondent Wael al-Dahdouh reported that medics at al-Shifa hospital named the dead policeman as Major Ali Makkawi. Three further police officers were injured.
The latest fighting underscored the challenges facing Palestinian President Mahmoud Abbas who wants to consolidate control in Gaza and came days after Palestinian police launched a campaign to prevent resistance fighters from carrying weapons on the streets.
Israel has said it will not resume peace talks with the Palestinians until they disarm groups such as Hamas, adding this is also mandated by a US-backed road map peace plan.