Security sources said the disturbance on Thursday broke out following a police operation to arrest suspects wanted in connection with drug trafficking and car theft.
A policeman and a relative of one of those arrested died of bullet wounds in the shootout after the detainee’s family attacked a police station.
After the clashes had died down, armed men from Fatah faction of Mahmoud Abbas, the Palestinian president, opened fire in the air near his Gaza residence as they recovered the dead policeman’s body from the local hospital.
Abbas himself was not in Gaza, having left in the afternoon from his main West Bank base of Ram Allah for Jordan.
Five Palestinians, including a policeman, were killed and 11 more wounded earlier this month in a gun battle between members of rival clans in the northern Gaza town of Beit Hanun.