Eight Palestinians, including four civilians, have been killed and about 60 injured in gunfights between rival political factions in the Gaza Strip.
Clashes broke out as militiamen loyal to the ruling party Hamas tried to break up protests by police and civil servants against unpaid wages.
The Hamas fighters exchanged fire with security forces loyal to Palestinian leader Mahmoud Abbas's Fatah movement.
Both Mr Abbas and PM Ismail Haniya have called for the violence to end.
The two men discussed the latest crisis over the telephone.
Mr Haniya stressed the "need for the government and the presidency to work together... to halt these tensions and ensure respect for law and order," his office said.
Earlier Mr Abbas said in an address broadcast on Palestinian television: "We will not allow these acts of violence to pass in silence and all those who participated by word or deed will be held to account."
With the leaders working to ease the tensions, the streets of Gaza did seem much calmer as the evening wore on, says the BBC's Alan Johnston in Gaza.
Hamas is locked in a power struggle with Fatah, which has been made worse by a severe economic crisis.
Earlier, Fatah supporters set fire to government buildings in Ramallah in the West Bank.
A gunfight broke out near the Palestinian parliament
In Gaza City, Hamas fighters with guns and clubs moved into a crowd of civilian and police protesters gathered near the Palestinian parliament.
The Hamas forces began shooting in the air before a gunfight broke out between them and security forces considered loyal to Mr Abbas.
Of the four militiamen killed, one was from the interior ministry force that supports Hamas and the other three were from those elements of the security forces traditionally seen as loyal to Fatah - among them, two members of the presidential guard.
Gunmen from both sides fired at each other from positions on rooftops near the building.
In Ramallah, supporters of Mr Abbas set Mr Haniya's office ablaze after marching through the city burning tires and shouting "Hamas, out, out".
Violence also broke out in Khan Younis in the south of the Gaza Strip, as Hamas militiamen clashed with gunmen in a district seen as a Fatah stronghold.
Schoolchildren and a television cameraman were among those injured in the day's violence, medical sources said.
Hamas government spokesman Ghazi Hamad said the presence of the militia on the streets was necessary to restore order to the Gaza Strip.
"We call our people in order to stop all kinds of clashes and the executive force is put only for imposing order and system, not to be in friction with the citizens or the other security forces," he said.
Tension in Gaza has been mounting for some time, with government workers going unpaid for six months.
The Hamas-led government has been crippled by a freeze in tax and aid payments from Israel, the EU and US because of its refusal to renounce violence or recognise the right of Israel to exist.
Attempts to bring Hamas and Fatah together in a unity government were aimed at breaking the deadlock by producing a compromise acceptable to donors.