Moderate Islamists claimed victory in Tunisia's first democratic election, sending a message to other states in the region that long-sidelined Islamists are challenging for power after the "Arab Spring".
Official results will be announced on Tuesday, but the Ennahda party said it had already tallied results posted at polling stations after Sunday's vote, the first since the uprisings which began in Tunisia and spread through the region.
"The first confirmed results show that Ennahda has obtained first place," campaign manager Abdelhamid Jlazzi said outside party headquarters in the centre of the Tunisian capital.
As he spoke, a crowd of more than 300 in the street shouted "Allahu Akbar!" or "God is greatest!". Other people started singing the Tunisian national anthem.
Alliance with secularists
Mindful that some people in Tunisia and elsewhere see the resurgence of Islamists as a threat to modern, liberal values, party officials said they were prepared to form an alliance with two secularist parties, Congress for the Republic and Ettakatol.
"We will spare no effort to create a stable political alliance ... We reassure the investors and international economic partners," Jlazzi said.
Two days after an unprecedented 90 percent of voters turned out for the election, officials were still counting the ballot papers in some areas. They said nationwide results would not be ready before Tuesday afternoon.
Sunday's vote was for an assembly which will sit for one year to draft a new constitution. It will also appoint a new interim president and government to run the country until fresh elections late next year or early in 2013.
The voting system has built-in checks and balances which make it nearly impossible for any one party to have a majority, compelling Ennahda to seek alliances with secularist parties, which will dilute its influence.
"This is an historic moment," said Zeinab Omri, a young woman in a hijab, or Islamic head scarf, who was outside the Ennahda headquarters when party officials claimed victory.
"No one can doubt this result. This result shows very clearly that the Tunisian people is a people attached to its Islamic identity," she said.
Tunisia became the birthplace of the "Arab Spring" when Mohamed Bouazizi, a vegetable seller in a provincial town, set fire to himself in protest at poverty and government repression.
'Changed the course of history'
President Barack Obama said Tunisia's revolution in January, which began with Bouazizi and ended with autocratic President Zine Al-Abidine Ben Ali fleeing abroad, had "changed the course of history."
"Just as so many Tunisian citizens protested peacefully in streets and squares to claim their rights, today they stood in lines and cast their votes to determine their own future," he said.
The suicide of vegetable peddler Bouazizi, prompted by despair over poverty and government harassment, provoked mass protests which ended Ben Ali's 23-year grip on power.
This in turn inspired uprisings in Egypt, Libya, Yemen, Syria and Bahrain which have re-shaped the political landscape of the Middle East and North Africa.
Ennahda is led by Rachid Ghannouchi, forced into exile in Britain for 22 years because of harassment by Ben Ali's police. A softly spoken scholar, he dresses in suits and open-necked shirts while his wife and daughter wear the hijab.
Ghannouchi is at pains to stress his party will not enforce any code of morality on Tunisian society, or the millions of Western tourists who holiday on its beaches. He models his approach on the moderate Islamism of Turkish Prime Minister Tayyip Erdogan.
The party's rise has been met with ambivalence by some people in Tunisia. The country's strong secularist traditions go back to the first post-independence president, Habiba Bourguiba, who called the hijab an "odious rag".
Outside the offices of the commission which organised the election, about 50 people staged a sit-in demanding an investigation into what they said were irregularities committed by Ennahda. Election officials said any problems were minor.
"I really feel a lot of fear and concern after this result," said Meriam Othmani, a 28-year-old journalist. "Women's rights will be eroded," she said. "Also, you'll see the return of dictatorship once Ennahda achieves a majority in the constituent assembly."
Ennahda's preferred coalition partners may reassure some opponents. Ali Larayd, a member of the party's executive committee, said it was ready to form an alliance with the Congress for the Republic and Ettakatol, both secularist groups respected by Tunisia's intelligentsia.
The Congress is led by Moncef Marzouki, a doctor and human rights activist who spent years in exile in France. Ettakatol is a socialist party led by Mustafa Ben Jaafar, another doctor and veteran Ben Ali opponent.
The only official results released were from polling stations abroad, because they voted early.
The election commission said that out of 18 seats in the 217-seat assembly allocated to the Tunisian diaspora, 9 went to Ennahda. Its closest rivals were Marzouki's Congress on four seats and Ettakatol, which won three.
The highest-profile secularist challenger to Ennahda, the Progressive Democratic Party (PDP) conceded defeat. It had warned voters that modern, liberal values would be threatened if the Islamists won.
"The PDP respects the democratic game. The people gave their trust to those it considers worthy of that trust. We congratulate the winner and we will be in the ranks of the opposition," a party statement sent to Reuters said.
Ennahda's win was a remarkable turnaround for a party which just 10 months ago had to operate underground because of a government ban and which had hundreds of followers in prison.
In a slick and well-funded campaign, the party tapped into a desire among ordinary Tunisians to be able to express their faith freely after years of aggressively enforced secularism.
It also sought to show it could represent all Tunisians, including the large number who take a laissez-faire view of Islam's strictures, drink alcohol, wear revealing clothes and rarely visit the mosque.
Secularist opponents say they believe this is just a cleverly constructed front that conceals more radical views, especially among Ennahda's rank and file in the provinces