Troops fired into the air on Friday to disperse a crowd trying to attack government offices in the town where the Arab Spring uprising began, hours after an Islamist party was declared winner of Tunisia's first free election.
The Ennahda Party, which was banned for decades and its leaders forced to flee abroad, will lead Tunisia's new government after an election victory likely to set a template for other Middle Eastern states rocked by uprisings this year.
Ennahda has tried to reassure secularists nervous about the prospect of Islamist rule in one of the Arab world's most liberal countries by saying it will respect women's rights and not try to impose a Muslim moral code on society.
The violence broke out in Sidi Bouzid, the provincial town where vegetable seller Mohamed Bouazizi set fire to himself in December, in an act of protest against officialdom which unleashed the revolts around the Arab world.
The latest protests in Sidi Bouzid were not linked directly to the Ennahda win, but to the fact that a party headed by a businessman popular in the town had been eliminated from the ballot over allegations of campaign finance violations.
Two witnesses in Sidi Bouzid told Reuters that a large crowd was trying to attack the local government headquarters in the town early Friday.
"The military are trying to disperse the people with shots in the air and tear gas," one of the witnesses, Attia Athmouni, said by telephone.
The witnesses said shops and schools were shut and a security forces helicopter was hovering overhead.
Late Thursday, after election officials announced it would cancel several seats won by the Popular List party, a crowd in Sidi Bouzid set fire to an Ennahda office and the office of the local mayor.
An Interior Ministry source said a night curfew would be imposed in the town from 7 pm (1800 GMT) until 5 am local time.
Destabilization
Ennahda leaders say the violence in Sidi Bouzid is an attempt by forces opposed to the revolution to destabilize the country, which has so far defied predictions that the election would tip the country into a crisis.
After his party's victory was confirmed, Ennahda leader Rachid Ghannouchi paid tribute to the town's role in Tunisia's revolution in January, which forced autocratic leader Zine al-Abidine Ben Ali to flee the country.
"We salute Sidi Bouzid and its sons who launched the spark and we hope that God will have made Mohamed Bouazizi a martyr," said the soft-spoken Islamic scholar, who spent 22 years in exile in Britain.
"We will continue this revolution to realize its aims of a Tunisia that is free, independent, developing and prosperous in which the rights of God, the Prophet, women, men, the religious and the non-religious are assured because Tunisia is for everyone," Ghannouchi told a crowd of cheering supporters.
Announcing the results, election commission members said Ennahda had won 90 seats in the 217-seat assembly, which will draft a new constitution, form an interim government and schedule new elections, probably for early 2013.
The Islamists' nearest rival, the secularist Congress for the Republic, won 30 seats, the commission members told a packed hall in the capital, ending a four-day wait since Sunday's poll for the painstaking count to be completed.
Islamist-led government
Ennahda fell short of an absolute majority in the new assembly. It is expected to broker a coalition with two of the secularist runners-up and, with them, form a government.
The Islamists will get the biggest say on important posts. They have already said they will put forward Hamadi Jbeli, Ghannouchi's deputy and a former political prisoner, for the post of prime minister.
Tunisia's complex election system, which replaced the rigged, one-horse races conducted before the revolution, made it impossible for any one party to win a majority of assembly seats.
Ennahda lies at the moderate and liberal end of the spectrum of Islamist parties in the Middle East. Ghannouchi models his approach on the moderate stance of Turkish Prime Minister Tayyip Erdogan.
Secularists say they fear the Islamists will try to impose an Islamic moral code on society but Ghannouchi has denied this. His officials say there will be no restrictions on foreign tourists – a big source of revenue – drinking alcohol or wearing bikinis on the country's Mediterranean beaches.
The party's victory is the first for Islamists since the Hamas faction won an election in the Palestinian territories seven years ago.
It is a result which will resonate in Egypt, where a party with ideological ties to Ennahda is expected to do well in a multi-stage parliamentary poll that starts in November.
The Popular List was running in fourth place in the election, according to preliminary results, before its seats were canceled. The party's leader used to support Ben Ali and during the election ran a populist campaign heavily promoted on the British-based television station he owns.
The violence appeared confined to Popular List supporters, as the three main secularist parties have already accepted defeat and there were no reports of clashes in other towns.
There was none of the predicted violence involving hardline Islamists who are more radical than Ennahda or secularists who believe the election result will threaten their liberal lifestyles.
Ghannouchi and his party officials have issued a carefully-choreographed series of announcements designed to reassure skeptics that there is no need to fear an Islamist government.
Defying stereotypes about Islamists keeping women covered up, one of the party's most prominent candidates is a businesswoman who does not wear the Islamic veil, or hijab, and this week sang along to pop songs at a party rally.
Ennahda has also reached out to anxious investors by saying it will not impose Islamic banking rules. It says it is inclined to keep the finance minister and central bank governor in their posts when it forms the new government.