A midnight gun battle erupted Thursday night after a day of tense standoffs in Gaza between security forces loyal to Palestinian Authority Chairman Mahmoud Abbas and a new militia run by the Hamas-led government, competing for control of the Gaza Strip.

At least four people were hurt, two police, one member of the Hamas force and a gunman from Abbas's Fatah movement, security sources and medics said.

It was not known what set off the exchange. The Palestinian police, who are mostly Fatah loyalists, were instructed by radio to respond with force to any attacks by Hamas forces.

The clashes came after Abbas told the Hamas-led government it must immediately remove its new security forces from the streets of Gaza, a top Abbas aide said Thursday.

The gun battle erupted just after midnight in front of the Palestinian parliament building, witnesses said. The condition of the wounded was not immediately known.

The gunbattles sent terrified residents fleeing from the nighttime streets of Gaza City, where tension has soared amid fears that confrontation between the forces could lead to major bloodshed and even civil war.

Witnesses: Gunfight broke out following exchange of shouts Witnesses said members of the Hamas force surrounded the main police station in Gaza City and traded fire with those inside.

"It began with the two sides shouting at each other and it developed into a gunfight," said one policeman who had brought a wounded comrade to hospital.

The AP reporter on the scene said Hamas forces closed off the streets leading to police headquarters, the stronghold of the Fatah loyalists, and sporadic exchanges of fire could be heard every few minutes, half an hour after the clash began. Police were running to their posts.

Khaled Abu Hilal, spokesman of the Hamas-controlled Interior Ministry, said unknown gunmen opened fire on the police headquarters from a moving car. Police apparently thought the Hamas forces nearby were responsible and fired at them.

A police spokesman, who refused to give his name, rejected that version and blamed the Hamas-led force for starting the gunfight.

Abu Hilal said all sides were working to calm the situation, and Egyptian diplomats were also involved.

The tensions between the two groups, sparked by Hamas' victory in the January parliamentary elections and assumption of power in March, had been further exacerbated by the Hamas-led government's decision to defy an Abbas veto on the issue and deploy its own 3,000-strong security force in the Strip.

'Erekat: A very worrying situation' "It's a very worrying situation," said Palestinian negotiator Saeb Erekat, who is close to Abbas. "He [Abbas] ordered the deployment of the [regular] Palestinian forces, and ordered the other [Hamas-linked] forces to leave the streets.

"I hope they will leave," Erekat said of the Hamas gunmen. "If they don't leave, we are heading toward a serious crisis."

But Palestinian Prime Minister Ismail Haniyeh said Thursday that the new force had been formed "in accordance with the law" and had been approved by Abbas.

"The force which was formed by a decision of the minister of interior is a backup force," Haniyeh said in a speech to several hundred policemen in Gaza.

"It was formed in accordance with the law and the constitution and with the agreement of brother Abu Mazen," he added, referring to Abbas.

"This force will be according to the law and integrated into the security services. The force is not directed against anyone. As they were in the forefront of resistance, they are now protecting the land and security."

A key area of dispute between Abbas' Fatah movement and Hamas is control over the security forces. Three of the six security branches report to the Hamas-controlled Interior Ministry, but Abbas has placed one of his loyalists in a commanding position of the most important of the three branches.

The new Hamas unit, called the "Security Forces Support System," is an attempt to grant an aura of formal authority to ongoing operations that have until now been carried out by Hamas's military wing and other armed groups including the Popular Resistance Committees.

The unit is headed by Jamal Abu Samhadaneh, a militant high on Israel's wanted list.

On Thursday, thousands of Palestinian police loyal to Abbas were ordered onto the streets of Gaza in a show of force, but did not take action against the Hamas force which was also deployed across large areas.

Marching near the Hamas-backed gunmen, the policemen chanted: "We are the authority. We salute Abu Mazen [Abbas]."

The Hamas militants did not react.

The policemen ran through the streets and conducted drills near Hamas patrols. They were unarmed, but were followed by commanders in jeeps, their weapons raised in the air.

"Jerusalem, the president, the homeland," the officers chanted, clapping and whistling. Hamas supporters watched from a distance.

General Suleiman Hilles, commander of Palestinian security forces in the West Bank and Gaza, said in a statement that the forces were deployed to send a message that "the Palestinian police is the only side that can maintain law and order."

Fatah gunmen open fire near deputy PM A short time earlier, dozens of Fatah gunmen firing in the air forced the Palestinian deputy prime minister, a Hamas member, to cut short a meeting in the West Bank town of Tul Karm, security officials and gunmen said.

Deputy Palestinian Prime Minister Nasser Shaer was meeting with the governor of the Tul Karm district when the building was surrounded by gunmen loyal to Fatah, security officials and Fatah gunmen said.

Shaer was taken out of the building under police escort, said a Palestinian security official. A reporter speaking to the official by phone heard gunshots in the background.

The local leader of a Al-Aqsa Martyrs' Brigades, aligned to Abbas' Fatah movement, said Hamas officials were not welcome in Tul Karm and that Shaer had been removed from the building "by force."

A bodyguard for Shaer confirmed shots were fired outside the building, but that the deputy prime minister, the highest-ranking Hamas official in the West Bank, was never in any danger.

Shaer later went to the Tul Karm municipality to continue the meeting there, the body guard said on condition of anonymity since he was not authorized to speak to the press.