Islamic militant group Hamas has won a surprise victory in Wednesday's Palestinian parliamentary elections.
Preliminary results give Hamas 76 of the 132 seats in the chamber, with the ruling Fatah party trailing on 43.
The win poses problems for efforts to restart peace talks with Israel, say analysts. Israel insists it will not deal with an authority including Hamas.
Palestinian leader Mahmoud Abbas, head of the Fatah party, says he remains committed to a peaceful settlement.
"Our main objective is to end the occupation and have an independent Palestinian state," he said at a news conference after the results were announced.
Prime Minister Ahmed Qurei of Fatah has offered to resign, and the party has said it will not join Hamas in government.
In Israel, interim Prime Minister Ehud Olmert said after a three-hour emergency meeting on Thursday that Israel would not negotiate with a Palestinian government including Hamas.
"Israel will not conduct any negotiation with a Palestinian government, if it includes any (members of) an armed terror organisation that calls for Israel's destruction," Mr Olmert's office said in a statement.
The BBC's Jeremy Bowen says Hamas' first big test will be an orderly transfer of power. If they can do it, Palestinians can at least hope for national unity, otherwise their immediate future is grim.
US President George W Bush said the poll was a "wake-up call" for the Palestian leadership, but he hoped Mr Abbas would stay in power.
He said the US would not deal with Hamas unless it renounced its call to destroy Israel.
But Hamas co-founder Mahmoud Zahhar refused to renounce violence.
"We are not playing terrorism or violence. We are under occupation," he told BBC World TV.
"The Israelis are continuing their aggression against our people, killing, detention, demolition and in order to stop these processes, we run effective self defence by all means, including using guns."
Hamas and Fatah supporters clashed on Thursday in the West Bank town of Ramallah. Shots were fired in the air and some injuries were reported.
The clash, which happened after Hamas supporters tried to raise their flag over the Palestinian parliament, was brought under control by police after about 10 minutes.
Election commission head Hanna Nasser said 95% of the votes had now been counted, and the results could still change slightly.
On top of the seats taken by Hamas and Fatah, the 13 remaining seats went to smaller parties and independents, some backed by Hamas.
The turnout was 77%.
Mr Abbas will now have to discuss with Hamas the formation of a new government and the appointment of a prime minister.
Hamas leaders have said they want to open talks with other groups including Fatah about a political partnership.
The BBC's Richard Miron in Jerusalem says the mood in Israel is one of gloom.
Israel's Foreign Minister, Tsipi Livni, appealed to the EU - the biggest financial donors to the authority - to firmly oppose the creation of a "terrorist government".
European leaders echoed the call for Hamas to renounce violence.
"I think it is important for Hamas to understand that there comes a point and the point is now... where they have to decide between a path of democracy or a path of violence," UK Prime Minister Tony Blair said.
US Secretary of State Condoleezza Rice will meet UN, European and Russian leaders on Monday to evaluate the result and decide how to proceed with peace efforts.
The BBC's Heba Saleh in Cairo says the Hamas win will also cause Arab governments concern and boost Islamist opposition parties in Egypt and Jordan. The BBC's Jon Leyne in Jerusalem says there is no doubt that the Hamas showing has transformed the Palestinian political arena.
But correspondents say Hamas seems unprepared for its own victory, and has not prepared itself to step neatly into government and assume immediate responsibility.
1) Fatah: 55 seats
2) Independent Fatah: 7 seats
3) Independent Islamists: 4
4) Independent Christians: 3
5) Independents: 15 seats
6) Samaritans: 1 seat
7) Others: 1 seat
8): Vacant: 2 seats
1) Hamas - 76 seats
2) Fatah - 43 seats
3) PFLP - 3 seats
4) Badil - 2 seats
5) Independent Palestine - 2
6) Third Way - 2 seats
7) Independent/other - 4