Fatah and Hamas gunmen battled each other at universities, a radio station and in streets across the Gaza Strip on Friday, in the deadliest single day of their struggle for control of the Palestinian government. Seventeen people, including four children, died before the factions' leaders announced a cease-fire.

Gazans huddled in their homes to escape the crossfire, which killed a total of 24 people and wounded 245 since fighting erupted on Thursday. Hospital officials said were running out of blood to treat the wounded.

On Friday afternoon, leaders of Hamas and Fatah said they had agreed to a new cease-fire, but needed to work out the details of a pullback of forces, who were battling in the streets with mortar shells, rockets and heavy guns.

"We, the leaders of the two groups, agreed with God's help on a cease-fire," said Nizar Rayan, a regional Hamas leader, after the meeting. "The measures that will be taken on the ground will be discussed in the next few hours." A Fatah spokesman, Abdel Hakim Awad, confirmed agreement was reached in principle.

An earlier truce unraveled after just two days.

More than 100 Palestinians have been killed in internal violence since Hamas won parliamentary elections last year and formed a Cabinet. After the election, Hamas established its own militia, as a counterweight to the security forces controlled by President Mahmoud Abbas. The forces have fought repeatedly.

In another effort to end the fighting, Abbas was to travel Tuesday to Saudi Arabia for talks with Hamas' exiled, Khaled Mashaal, on forming a national unity government, said Jamal Shobaki, Palestinian ambassador to Saudi Arabia.

Previous rounds of talks have ended in failure and often led to new bloodshed.

On Friday afternoon, in an attack fraught with symbolism, Fatah forces raided a Hamas stronghold, the Islamic University in Gaza City, setting fire to two buildings and sparking a heavy firefight with Hamas forces. Masked men in black ran through the campus and took up positions on the roof of the school's mosque.

Hamas gunmen vowed revenge, and hours later, group members attacked two buildings of the Fatah-affiliated Al-Quds University, Palestinian security officials said.

The raid Friday on Islamic University was the second in two days. On Thursday, Fatah said it had burst into the campus and arrested seven Iranians, while an eighth committed suicide. The security official spoke on condition of anonymity because of the sensitivity of the issue. He offered no proof.

The Al Aqsa Martyrs' Brigades, a Fatah-affiliated militant group, said it had carried out the raid of the university with the security forces and accused Hamas of using the campus to manufacture and distribute weapons.

Hamas spokesman Ismail Radwan denied the presence of Iranians at the university and called charges that it was used for military purposes "ridiculous."

"The university has absolutely no business in politics, or military work," he said.

In other violence, 50 officers from Abbas' presidential guard surrounded the Hamas-led Interior Ministry on Friday and exchanged fire with Hamas gunmen guarding the building. Five guardsmen were killed.

Outside Gaza City, Hamas militants launched mortar shells at a Fatah training base, wounding 30 recruits, security officials said. One shell hit a nearby house and wounded two children inside.

In all, 17 people died in the fighting on Friday, the Health Ministry said. Exactly a week earlier, 16 Palestinians died in factional violence.

The roads of Gaza were nearly empty on Friday, sealed off by roadblocks of rubble and garbage. Only masked security officers, some with hand grenades clipped to their ammunition vests, were visible in the streets. The sound of gunfire mixed with the call to prayer, but the mosques were mostly empty.

Hamas gunmen blew up the Fatah-affiliated Voice of Labor radio station in the northern town of Jebaliya after a five-hour siege, according to Rasem Bayri, who heads the Palestinian Federation of Labor Unions. The Hamas fighters pulled down a Palestinian flag flying on the roof of the building and put up a green Hamas flag, Bayri said.

Meanwhile, Israeli troops killed two armed Palestinians near the West Bank city of Ramallah early Friday. Palestinian security officials said the men were police officers on a routine patrol. The army said two armed men in civilian clothes approached troops on an overnight raid, and the soldiers opened fire when the men refused to put down their weapons.

Click here to go to FOXNews.com's Mideast Center.