A Tunisian Islamist party emerged victorious in the Arab Spring's first elections, taking 90 of 217 seats on a new assembly nine months after the ouster of dictator Zine el Abidine Ben Ali.
Violent protests broke out in the central town of Sidi Bouzid, where the uprising started last December, after the provisional final results were announced, witnesses and the interior ministry said.
The Ennahda party now has the single-biggest share of the assembly assembly that will rewrite the constitution, appoint a president and form a caretaker government, elections chief Kamel Jendoubi told journalists in Tunis.
He also announced the invalidation of six candidates' lists of the Petition for Justice and Development, including one in Sidi Bouzid, notably due to "financial irregularities".
The group had nevertheless obtained 19 assembly seats.
Witnesses said more than 2,000 young people on Thursday marched on Ennahda's headquarters in Sidi Bouzid at the news and pelted security forces with stones.
An AFP correspondent said they broke doors and windows of the Ennahda building and set alight tyres on the town's main road.
A similar protest was under way in the town of Regueb, some 50 kilometres (30 miles) from Sidi Bouzid, said witnesses, where a gunshot was fired at the local Ennahda offices.
On the main road in the capital Tunis however, the results were met with a cacophony of car hooters blaring, as people hung out of car windows singing and waving Ennahda and Tunisian flags.
The provisional results put two leftist parties in second and third place after Sunday's historic polls: the Congress for the Republic (CPR) obtaining 30 seats, and Ettakatol 21 seats.
In fourth place was the Petition, a grouping led by Hechmi Haamdi, a rich London-based businessman said to have close ties to Ben Ali. Following the announcement of the invalidations, Haamdi announced the withdrawal of all his candidates from the assembly.
Ennahda was banned under Ben Ali's regime and only registered as a political party in March.
But on Wednesday, preempting the official news of its victory, it announced it had started coalition negotiations and intended to form a new government within a month.
Signup to our newsletter and follow us on Facebook and Twitter!
The party, which presents itself as having a moderate Islamist agenda, has put forward its number two, Hamadi Jebali, as candidate for prime minister.
The new assembly will decide on the country's system of government and how to guarantee basic liberties, including women's rights, which many in Tunisia fear Ennahda would seek to diminish despite its assurances to the contrary.
Analysts have said that Ennahda, even in a majority alliance, would be unable to "dictate" any programme to the assembly.
They argue that it will have no choice but to appease its coalition partners, a moderate-minded society, and the international community on whose investment and tourism the country relies heavily.
Leftist parties may yet seek to form a majority bloc against Ennahda, which said it had met bankers and stockbrokers earlier Thursday to "reassure" them.
Tunisian voters turned out in strength Sunday to elect the new assembly.
The electoral system was designed to include as many parties as possible in drafting the new constitution, expected to take a year, ahead of fresh national polls.
Coalition negotiations are expected to be complicated, with all of Ennahda's potential partners on the leftist, secular side of the spectrum.
But Ennahda leader Rached Ghannouchi has said a government would be put together as soon as possible, "within no more than a month."
Jebali on Wednesday signalled his intention to form an executive with the highest scoring leftist parties, singling out the CPR and Ettakatol.
At the same time Ettakatol chief Mustapha Ben Jaafar said coalition talks had started "with all the political partners, including Ennahda."
The CPR has defended its talks with the Islamist party.
"No, no, no it is not the devil and we do not make pacts with the devil," party leader Moncef Marzouki said on Wednesday.
"One must not take them for the Taliban of Tunisia. It is a moderate part of Islam."
The names of presidential candidates have started circulating in the media, including those of Marzouki, Ben Jafaar and current interim Prime Minister Beji Caid Essebsi.
The Progressive Democratic Party, polled in second place before the election, came fifth with 17 seats.