Hamas blames Fatah supporters for the beach bombing, but Fatah denies any involvement.
Over the past week, the two sides have engaged in tit-for-tat arrests.
At about the same time as gun battles raged in Gaza, Hamas accused Fatah of kidnapping Mohammed Ghazal, one of its leaders in the West Bank, and warned Mahmoud Abbas, the Palestinian president, that he would be held responsible.
Ghazal's relatives said he was freed after being held briefly by armed men.
His captors were fighters from al-Aqsa Martyrs Brigades, an armed Palestinian group loosely linked to Fatah.
Ghazal had already been released on Friday along with other Hamas members after being detained by Palestinian Authority security forces in the West Bank.
In another move, Hamas ordered the closure of a radio station, Voice of the People, linked to the Popular Front for the Liberation of Palestine (PFLP) in Gaza City, a spokesman for the left-wing group said.
Hamas said two of its men were killed and Palestinian medical officials reported two more dead and scores wounded in Saturday's firefights.
More than 60 people were hurt, including seven reported to be in a serious condition.
|Ghazal was released by Fatah-linked captors after a brief kidnap drama [AFP]
The clashes broke out around a house belonging to the influential pro-Fatah Hilles clan in Gaza's Shijaia district.
Ahmad Hilles, a Fatah politician and leader of the clan, told the AFP news agency that Hamas fighters "laid siege to our house, firing mortar rounds ... targeting our women and our children".
Islam Shahwan, a Hamas policeman, said that the fighting ended on Saturday afternoon.
A three-day curfew has been imposed on the area.
Abbas called Hilles "to express his support and denounce the Hamas attack", according to a statement by Abbas's office.
He also told Hilles that "Hamas's attacks undermine my call for national dialogue between Palestinian factions".
Shortly after the fighting in Shijaia subsided, dozens of Fatah members, including Ahmed and Adel Hilles, another Fatah politician, fled to the Nahal Oz crossing with Israel in a bid to escape to the West Bank city of Ramallah, home to Abbas's headquarters.
Israel allowed the Palestinians who put down their guns to cross as a "humanitarian measure," an army spokesman said. The wounded were taken to hospital and the rest were transported to Ramallah.
Ehud Barak, the Israeli defence minister, authorised the measure after a personal request from Abbas, Salam Fayyad, the Palestinian prime minister, and Egypt, a senior defence official told AFP.
Al Jazeera aired footage of several Palestinian men, presumed to be from the Hilles family, blindfolded, handcuffed and stripped to their underpants, surrounded by Israeli soldiers at a border crossing.
Hamas has detained more than 300 people, mostly Fatah members, since the July 25 bombing.
Fatah has responded by arresting Hamas fighters in the Israeli-occupied West Bank.
Sami Abu Zuhri, a Hamas spokesman, charged that members of the Hilles family and other unidentified associates had "fired mortar rounds at the Hamas police as well as a rocket at Gaza City" from inside the Shijaia house.
Several members of the Hilles clan "are responsible" for the July 25 bomb attack and Hamas is determined to round up the suspects, Abu Zuhri said.
But Adel Hilles denied that clan members opened fire on Hamas.
"These are lies. We never fired rockets or mortar rounds. Hamas is the one committing crimes. We have asked all the Palestinian factions, Islamists and nationalists, to use their influence so that these crimes cease," he said.
Al Jazeera's correspondent in Gaza, Nour Odeh, said the Hilles clan was closely linked to Fatah and had members serving in al-Aqsa Martyrs Brigades.
"It is an old and prominent clan in Gaza and known to be very proud," she said.
Fatah and Hamas, the two main Palestinian factions, have been deeply divided since Hamas expelled Abbas's security forces from Gaza in a week of bloody street battles in June 2007.
Lamis Andoni, Al Jazeera's political analyst, called the latest violence "an extremely dangerous development" that could trigger an all-out Fatah-Hamas confrontation that could have a serious fallout in the West Bank.
"If it is not contained, prospects of a civil war are imminent, especially if the Gaza clashes spark tribal retributions between the Hilles clan and clans of Hamas security officers," she said.