Hamas militiamen withdrew from Gaza's streets Monday to prevent a new round of violence after the worst day of internal Palestinian fighting under the Hamas government. But sporadic gunbattles persisted in Palestinian areas.

In the northern West Bank town of Nablus, Deputy Prime Minister Nasser Shaer said Fatah militants shot at his bodyguards as they rode in a government car, injuring two of them. Shaer was not present during the attack. Hospital officials said a Fatah militant was also injured in the fighting.

At Gaza City's main hospital, a 20-minute gunbattle erupted when the family of one of those killed Sunday arrived to retrieve his body.

The Fatah gunmen accompanying the family opened fire on the Hamas militiamen patrolling the hospital, sending patients and doctors running for cover. No one was injured, hospital officials said.

Visit FOXNews.com's Mideast Center for more in-depth coverage.

Fatah also enforced a general strike in parts of the West Bank, closing shops and private schools in a show of force against Hamas. For its part, the Hamas-led government ordered all ministries closed to protest Fatah attacks on government buildings.

Fatah militants also released a Hamas official in the Finance Ministry they had briefly kidnapped, telling him his abduction was intended to send Hamas a message to end the Gaza violence, Hamas officials said.

Speaking to his Cabinet on Monday, Prime Minister Ismail Haniyeh, of Hamas, said the tension in Gaza had eased, but worried about the West Bank.

"We reiterate to our people to be responsible, not to spread the circle of disagreements and conflict, and not to transfer events to other parts of the nation," he said.

The violence that killed eight people Sunday began when members of the Hamas-led government's 3,500-man militia confronted civil servants — including members of the Fatah-allied security forces — who were protesting the government's inability to pay their wages.

The tense confrontations erupted in running gunbattles that spread across the Gaza Strip, sending civilians fleeing for their lives and turning the center of Gaza City into a battle zone.

Fatah militants quickly followed through on a promise to retaliate for the Gaza violence with attacks of their own in the West Bank, where Hamas is far weaker.

Hundreds of angry Fatah supporters torched the Cabinet building in Ramallah and trashed Hamas-linked offices in the cities of Hebron and Nablus.

Haniyeh and Palestinian President Mahmoud Abbas, of Fatah, appealed for calm.

"These confrontations have crossed the red line, which we have avoided crossing for four decades," Abbas said in a speech on Palestinian TV.

Abbas called for the security officers to end their protest and for the Hamas militia, which the government formed after Abbas took control of all the official security branches, to leave the streets.

Late Sunday, Interior Minister Said Siyam, who is in charge of the militia, ordered it to withdraw, and by Monday morning, the militiamen had stopped patrolling the streets and pulled back to their bases near government ministries and on some street corners, reducing friction.

In the southern Gaza town of Khan Younis, where the violence began, dozens of official security officers were patrolling the streets to maintain order.

Despite the appeals for calm, militants in Gaza torched the Agricultural Ministry early Monday, and a group of young students in the northern Gaza town of Beit Hanoun stoned the house of a Hamas minister until his bodyguards chased them away by firing in the air.

Amid the violence, Abbas called for the renewal of stalled negotiations for the formation of a national unity government, a move aimed at ending crippling sanctions on the Palestinian Authority. However, the violence dampened hopes for a Hamas-Fatah coalition.

Israel and the West, which view Hamas as a terrorist group, cut off hundreds of millions of dollars in aid and tax transfers to the Palestinian Authority after Hamas took power, making it nearly impossible for the new government to pay its 165,000 workers.

Abbas has tried to end the crisis by pushing Hamas to accept international demands to renounce violence and recognize Israel's right to exist, but the radical Islamic group has refused.

Violence between Fatah and Hamas loyalists plagued Gaza throughout the spring, but largely disappeared when Israel launched a Gaza offensive in late June after Hamas-linked militants captured an Israeli soldier.

Abu Mujahed, a spokesman for the Popular Resistance Committees, one of the groups responsible for Cpl. Gilad Shalit's capture, said Monday that contacts with Egyptian mediators trying to broker his release had resumed, but there was no agreement.

"Until now there is nothing new. All the talks about achieving a deal are false," he said.

The militants are demanding Israel release hundreds of Palestinian prisoners in return for Shalit.

Also Monday, a Palestinian fisherman was shot and killed by an Israeli gunboat off the coast of Khan Younis, Palestinian officials said. The Israeli army said it was unaware of the incident. Israel has forced fishermen to remain near shore since the offensive began June 28.

Israel's army chief, Lt. Gen. Dan Halutz, said Sunday the military was considering another ground offensive into Gaza. Hours later, Israeli tanks, bulldozers and troops moved into northern Gaza. The army said the operation was aimed at preventing rocket fire from militants.

Complete coverage is available in FOXNews.com's Mideast Center.