Leaders of Palestinian factions Hamas and Fatah have agreed to an Egyptian-brokered truce in Gaza that will have them pulling their fighters off the streets after fighting killed four people and wounded a dozen.
Officials also agreed to exchange prisoners in their two-hour long talks.
The truce seemed to have taken effect in part, but Nour Odeh, Al Jazeera's correspondent in Gaza, said skirmishes were still going on. Many previous ceasefires have not lasted long.
Two members of Fatah's military wing were killed on Sunday in an attack it blamed on Hamas while Hamas said Fatah loyalists had killed two men and injured nine outside a mosque in Gaza City.
Baha Abu Jarad, a commander of al-Aqsa Martyrs Brigades, was killed with one of his men when their vehicle was ambushed in Beit Lahiya on Sunday.
Abu Qusai, a Brigades spokesman, held Izz al-Din al-Qassam Brigades, Hamas's armed wing, and its executive force responsible. Al-Qassam Brigades denied involvement.
"The new government should show signs of maturity and responsibility"
Husky, Ottawa, Canada
Send us your views
Three people were later wounded in a shooting at the funeral for the commander in northern Gaza, witnesses said.
After the attack, unidentified armed man seized a Hamas official in Gaza City, a Hamas source said.
Fatah had no immediate comment on Hamas's claim that Ali al-Sharif, a lecturer at the pro-Hamas Islamic University in Gaza City, had been abducted by Fatah loyalists.
After al-Sharif was seized, at least 15 people were taken by Fatah and Hamas in a wave of tit-for-tat abductions.
Fawzi Barhoum, Hamas spokesman, said Fatah loyalists seized 15 of its supporters throughout Gaza, with one released several hours later.
Barhoum called on "all Hamas and Qassam men to go on high alert".
Mustafa Barghouti, the Palestinian information minister with no explicit affiliation to Hamas or Fatah, had called on the two sides to bring their forces under control.
"Not only the future of the government but the future of all the Palestinian people will be endangered if these bloody acts continue," he said.
The shootings on Sunday were the worst internal fighting in Gaza since a ceasefire between the groups was agreed to in February.
Fighters from the opposing organisations set up makeshift checkpoints throughout Gaza after the shootings.
Odeh said snipers for the military wings of both Hamas and Fatah had taken position on rooftops in Gaza City.
Shops closed and some people left their homes to escape the threat of further violence, Odeh reported.
Palestinian police were recently deployed in Gaza under a new security plan in an attempt to maintain order and ease tensions between Fatah and Hamas, which formed a unity government in March.
However, fighters from the al-Qassam Brigades and the Fatah-dominated national security forces fought on Friday in clashes that wounded at least six people.
Previous police deployments in Gaza have not fully secured the territory since Israel withdrew troops and settlers in 2005.