GAZA CITY, Gaza Strip - Gaza's warring factions began to hold their fire yesterday as a truce took effect across the volatile territory and brought hopes for an end to the infighting that has left 36 people dead in five days.

But the killing of a Hamas fighter by rival Palestinians - combined with an Israeli air strike on a smuggling tunnel after a suicide bombing - underscored the fragility of any lull in Gaza's bloodshed.

Palestinian Prime Minister Ismail Haniyeh of Hamas called for a total halt to the violence.

"The past few days were difficult, and everyone paid in blood," he said in Gaza. "Everyone is facing a difficult test. Either we maintain this calm . . . or everything collapses again, and then everyone will be held responsible."

Previous truces between Hamas and Fatah gunmen in Gaza have quickly collapsed into new fighting, and it appeared unlikely the two sides would comply with all the terms of the current agreement, such as handing over all those involved in killings and abductions.

Late yesterday, the two sides began releasing hostages - fighters kidnapped over the last week - both sides said.

Gunmen from both sides have used prior lulls to prepare for more fighting.

Yesterday morning, the streets of Gaza were calm, as radio stations loyal to Fatah and Hamas groups played national songs instead of factional music and stopped inciting their supporters against their rivals.

Hopes for an enduring truce fell in the afternoon after a Hamas gunman was killed in the southern Gaza town of Khan Younis. Hamas officials blamed the shooting on Fatah, and Hamas supporters took to the airwaves, saying those behind the campaign against their group must be targeted.

However, Hamas officials said they would not retaliate.

Both Fatah and Hamas say bringing suspects to trial is crucial to maintaining the truce.

"If the killers remain in the streets, the cycle of bloodshed will not stop," said Maher Mekdad, a Fatah spokesman. "Families of victims will take the law in their own hands, and revenge will rule."

The truce agreement did nothing to resolve the underlying power struggle between Hamas and Fatah that has fueled the fighting. The two sides have been at odds since Hamas defeated Fatah in legislative elections a year ago, dividing power in the Palestinian government.

Palestinian Authority President Mahmoud Abbas of Fatah, elected separately two years ago, has urged Hamas, which faces international isolation because of its anti-Israel ideology, to join Fatah in a more moderate coalition. He hopes a softer platform will help end a crippling international aid boycott imposed after Hamas' victory and allow him to resume peace talks with Israel.

Even if the truce holds, it does not necessarily mean peace for Gaza after a Palestinian suicide bomber from Gaza killed three people in the Israeli resort city of Eilat on Monday.

Early yesterday, the Israeli army bombed a tunnel it said was meant for use by Gaza extremists for another attack. No casualties were reported. In the past, extremists dug such tunnels to attack Israeli army outposts and other targets.