The Palestinian Territories ruling Fatah Party looks to have won a slim victory in the annexed state's first parliamentary election in a decade.
And crucially for peace prospects, exit polls are indicating that it has captured enough seats to govern without the militant group edged out Hamas.
The strong showing by Hamas, which was contesting its first election, reflected popular discontent with Fatah, the secular party that has led the Palestinian Authority since its creation 12 years ago and has been accused of widespread corruption and mismanagement.
The election was the Palestinians' first truly competitive vote and helped cement democracy in the post-Yasser Arafat era.
But it also gave unprecedented clout to Hamas, which calls for Israel's destruction and is listed as a terror group by the EU and US.
An exit poll by Bir Zeit University in Ramallah, showed Fatah winning 63 seats in the 132 member parliament with 46.4 per cent of the vote and Hamas taking 58 with 39.5 per cent.
Smaller parties received 11 seats, according to the poll of 8,000 voters in 232 polling stations.
The poll had a one seat margin of error.
A second survey showed Fatah beating Hamas 42 per cent to 35 per cent.
If the surveys bear out, Fatah will be able to form a governing coalition with some of the smaller parties, a scenario Palestinian leader Mahmoud Abbas has said he preferred.
Hundreds of thousands of Palestinians flooded polling stations throughout the West Bank and Gaza Strip today for a vote that could have led to the end of efforts to pursue negotiations with Israel.
Long lines formed at polling stations throughout the day and 77.7 per cent of 1.3 million eligible voters cast ballots before polls closed.
Under a compromise with Israel, some Arabs in east Jerusalem were allowed to cast absentee ballots at post offices in the disputed city, and voting was extended there by two hours because postal workers were slow.
Election officials began counting the votes soon after polls closed and preliminary results were expected late tonight or early tomorrow. Complete results were expected by late tomorrow.