The Islamic resistance movement Hamas appears to have crowned its first parliamentary election campaign with a shock defeat over mainstream rivals Fatah.
Senior Hamas official Ismail Haniya said all parties had to respect the will of the Palestinian people which has been expressed at the polls.
Palestinian chief negotiator Saeb Erekat told journalists that his party, Fatah, would sit in opposition and would not form part of any unity government.
Supporters of the radical Islamist movement have taken to the streets to celebrate the group's apparent victory.
Hamas supporters are also keeping track of the results via mobile phones and computers.
Exit polls after the ballot centres closed had suggested a lead for Fatah, but that began to change as votes were counted.
Rival supporters gathered outside polling stations, but as the exit polls came out the mood among Hamas members was downbeat.
But in school classrooms around the West Bank and Gaza, votes were being accumulated by the Hamas list.
Fatah supporters had celebrated the exit polls in the mistaken belief that they had held off the Islamist challenge.
Hamas supporters celebrated in the streets of Ramallah - the Palestinian seat of government.
Fatah and Hamas supporters exchanged stones in the town after a bid by Hamas to take over the parliament.