GAZA CITY, Gaza Strip - Gunmen armed with rifles, grenades and explosives climbed down from rooftop positions yesterday, and residents began venturing out of bullet-scarred homes after their leaders agreed to end a week of Palestinian factional bloodshed in Gaza.

The truce began to take hold as Israel launched a fifth day of air strikes on Hamas targets in the Gaza Strip in reprisal for the group's rocket attacks on Israeli border towns. Other recent cease-fires between the Fatah and Hamas factions have been short-lived, but Hamas spokesman Fawzi Barhoum said he expected this one to stick because of Israel's military action.

"No one would accept to fight one another while the Israelis are shelling Gaza," he said.

The clashes between Hamas and the Fatah gunmen loyal to Palestinian Authority President Mahmoud Abbas have brought the two groups that nominally share power to the brink of civil war. More than 50 Palestinians were killed in a week of infighting.

The overlapping violence from Israel's attacks on Hamas rocket operations killed 23 other Palestinians in the last week.

Israeli Defense Minister Amir Peretz yesterday vowed to keep going after Hamas fighters who would fire rockets at Israel, warning them to be "very afraid."

Still, Peretz said time was not ripe for a major Israeli ground offensive in Gaza.

Two Israeli airstrikes on Hamas targets killed three Palestinians and injured three. Five rockets from Gaza hit the Israeli border area yesterday, causing damage, but no injuries.

The air attacks, backed by tank fire, have driven Hamas fighters out of their bases, prompting the Islamic extremist group to accuse Israel and Fatah of colluding against it.

The Palestinian infighting broke out last Sunday, after Abbas stationed thousands of security forces on the streets of lawless Gaza City - a move Hamas interpreted as a provocation because it wasn't consulted.

Yesterday's truce committed the battling factions to pull their fighters off the streets and exchange an unknown number of hostages.

Four previous cease-fire agreements collapsed last week.

A gun battle erupted outside the home of a senior Fatah official in Gaza City as the cease-fire was reached, and security officials said several people were wounded.

And in another sign of the shaky nature of the truce, several hostages from both factions were released before an official exchange ceremony - but only after their captors shot them in the legs, both sides said.

Still, as word of the cease-fire spread, and enforcement teams went out on the streets, fighters began to comply - something they had not done with the previous truces. They also began knocking down roadblocks they had set up to identify rival fighters.

Truce enforcers from various Palestinian factions went from rooftop to rooftop, urging gunmen to leave. At one Gaza City building that had been the site of fierce fighting, Hamas fighters climbed down carrying a cache of rocket-propelled grenades, bags of explosives and AK-47 rifles.

Mervat, a resident who would only give her first name for fear of reprisal, said the fighting terrorized her 5-year-old daughter, who thought the conflict was with Israelis. The two never left home throughout the fighting.

"Hopefully it will stick this time. We are the only losers if this continues," she said.

She and other residents who had remained holed up at home throughout the fighting stepped out hesitantly to shop for groceries and other supplies.