Updated

Thousands of Palestinian police officers demanding to get paid fired in the air and smashed windows Thursday in the most violent protest yet against the Hamas government.

The demonstration further raised tensions between Hamas and the security forces dominated by the rival Fatah movement of moderate President Mahmoud Abbas.

Later Thursday, four members of the security forces were wounded in two separate shootings in Gaza, including one attack blamed on Hamas.

CountryWatch: Israel

The demonstration and the shootings came as Hamas debated whether to accept the idea of a Palestinian state next to Israel, including implicit recognition of the Jewish state, or face a national referendum.

Abbas has given Hamas until the middle of next week to make up its mind. Abbas was to travel to Gaza on Friday for several days of talks with Hamas leaders.

Hamas was founded two decades ago with the goal to destroy Israel and establish an Islamic state in its place. Foreign Minister Mahmoud Zahar, a Hamas hardliner, said during a visit to China on Thursday that he opposes a 2002 Arab peace initiative that calls for a two-state solution to the Mideast conflict. However, other Hamas politicians, particularly in the West Bank, have signaled willingness to go along with Abbas.

A new survey indicated the vast majority of Palestinians side with Abbas. The Near East Consulting Agency found that 89 percent of Palestinians support a two-state solution. The agency interviewed 511 people and the survey had a margin of error of 4.3 percentage points.

While agonizing over its political platform, Hamas was also coming under increasing pressure from ordinary Palestinians. Since taking office in March, Hamas has been unable to pay the salaries of some 165,000 civil servants because of crushing international tensions. Among those not getting paid are tens of thousands of members of the security forces, many loyal to Abbas and his Fatah movement.

Finance Minister Omar Abdel Razek said Wednesday that the government has raised enough money to pay only 40,000 low-wage workers, leaving more than 100,000 workers, including many security officers, without salaries for a third straight month.

About 3,000 police demonstrated Thursday's outside the parliament building in Gaza, denouncing the government's inability to pay them.

"We came to voice our anger, our protest and to send a message," said Nidal Rajab, a 29-year-old officer and father of three. "The government is using its hand to stab us in the back."

Banners saying "90 days without salaries is more than enough" were posted on the parliament building. A group of new recruits went on a brief rampage, smashing six windows and climbing on the roof of the building before security forces pushed them away.

Several stray bullets fired by the protesters smashed two windows in the Gaza City office of The Associated Press, narrowly missing an AP photographer and damaging an air conditioning unit.

Participants also called on Hamas to disband a private militia it recently deployed in Gaza's streets. Hamas says the militia was needed to end the chaos and violence there. Members of the Hamas force were nowhere in sight.

Later Thursday, four members of the Preventive Security Service were wounded in two separate shootings. Near the southern Gaza town of Khan Younis, Preventive Security said three of its agents traveling in a van were shot and wounded by Hamas gunmen. Hamas said its gunmen had come under fire first, and were acting in self-defense.

Near Gaza City's Shati refugee camp, a senior Preventive Security officer came under fire while driving in his car, and was seriously wounded, hospital officials said.

In the West Bank town of Jenin, the two-state idea won an unexpected endorsement from members of the violent Islamic Jihad group. Political leaders of Islamic Jihad have rejected Abbas' proposal, but a group of Jenin gunmen said in a news conference that they back the idea.

Abbas hopes to restart peace talks with Israel. But Israel's prime minister, Ehud Olmert, says that is unlikely until Hamas moderates.

If peace efforts remain stalled, Olmert plans to carry out a unilateral pullback from much of the West Bank. Under the plan, Israel would keep major settlement blocs, falling short of Palestinian claims to all of the West Bank.

In an interview published Thursday, Olmert said the withdrawal would be carried out in one phase, rejecting calls to do it gradually. The plan is expected to uproot some 70,000 Jewish settlers from their homes.

"This process will be difficult and painful even if we do it in the smoothest way," Olmert told the Yediot Ahronot daily. "I think that breaking it into phases will shock the public and thus I oppose this."

Olmert also said he would meet Abbas at the end of June and explore whether it is possible to resume peace talks.