Earlier in the day, Hamas and Fatah gunmen fired mortar shells and lobbed grenades at each other outside a security compound in Gaza City.
Fighting on Friday was among the deadliest in nearly two months and marred the first anniversary of Hamas' upset victory in Palestinian elections. After nightfall, the fighting showed no signs of slowing, as the sound of gunfire echoed throughout Gaza City.
The heaviest shooting was concentrated around the home of Mansour Shaleil, a local Fatah leader in the Jebaliya refugee camp just north of Gaza City.
Hamas gunmen surrounded the home early Friday to detain Shaleil, accusing him of involvement in a shooting that killed two Hamas supporters. After an hours-long standoff, dozens of Hamas gunmen stormed the house and exchanged fire with Shaleil and his supporter, according to witnesses and ambulance drivers.
They later withdrew, Palestinian media reported, leaving Shaleil unharmed. Two men identified as Hamas militants were killed.
"It looks like they forgot who the enemy is," said Maher Mekdad, a Fatah spokesman. "They forgot the Israeli occupation."
Fatah gunmen, meanwhile, kidnapped 19 Hamas militants and threatened to kill them if Shaleil was harmed, officials on both sides said. After Shaleil's rescue, Hamas and Fatah officials said they were working with mediators to arrange the hostages' release.
During the day, fighting also spread to the headquarters of the pro-Fatah Preventive Security agency in Gaza City. Four Hamas gunmen were killed in a battle outside a nearby mosque.
Hamas accused Fatah gunmen of starting the battle and wounding several worshippers in a drive-by attack. Mortar shells and rocket-propelled grenades were fired during the melee, smashing windows on several homes.
In other incidents, fighting erupted outside the residences of Palestinian President Mahmoud Abbas of Fatah and Foreign Minister Mahmoud Zahar of Hamas. Hamas officials said Zahar's home was damaged by two rocket-propelled grenades.
Hundreds of security forces loyal to Abbas, who was in Europe at the time, were sent into the streets to protect his compound and various security installations.
In all, 13 people were killed and 45 wounded throughout Gaza, medical officials said, in addition to two others killed just before midnight Thursday. Friday's dead included a 2-year-old boy who was shot while traveling in a car in the southern town of Khan Younis. Hamas and Fatah officials accused each other of firing the deadly shot.
Just before midnight, a Palestinian policeman was killed in a patrol car, and his partner was wounded in the legs, officials said.
Abbas has threatened to order early elections, but Hamas has said it would boycott a new vote.
Abbas' threat to call new elections, along with the deadlock in unity talks, has fueled the factional violence.
Both Fatah and Hamas officials said late Friday that unity talks would be suspended until the fighting ends. Both sides blamed each other for the breakdown.
"Following the awful massacres committed today ... we have decided to postpone all dialogue with Fatah," said Ismail Radwan, a Hamas spokesman.
In the West Bank city of Nablus, meanwhile, Fatah gunmen kidnapped a group of nine people, saying they were Hamas supporters. The group, consisting of a religious instructor and his teenage students, was freed after several hours.