Mourners carrying the coffin of the murdered politician, Chokri Belaid
Thousands of Tunisians have attended the funeral of opposition leader Chokri Belaid, who was killed on Wednesday by a gunman who fled on a motorcycle.
There were minor clashes as his coffin was carried through Tunis, but the event was largely peaceful.
Sporadic protests and clashes have been reported all around Tunisia, and many workers are observing a general strike.
Unions say the Islamist-led government is to blame for the killing, an accusation it denies, reports the BBC.
Prime Minister Hamadi Jebali has tried to defuse tension by calling for a non-partisan technocratic government. However, his governing Ennahda party has refused to accept this.
Some 3,000 people initially gathered outside the building in the Djebel Jelloud suburb of Tunis where Belaid's flower-covered coffin lay.
Crowds chanted slogans accusing the government of murdering Belaid, 48.
"With our blood and our souls we will sacrifice ourselves for the martyr," the mourners shouted.
Thousands more people then joined the coffin as it was taken on a funeral procession toward the nearby cemetery of el-Jellaz.
Many more people are expected to take to the streets of the capital after Friday prayers and ahead of the burial in the afternoon.
Hundreds of riot police have been deployed in Habib Bourguiba Avenue, the scene of earlier violence.
Police fired tear gas to break up youths attacking cars close to el-Jellaz cemetery, and also at protesters near the interior ministry.
Elsewhere in Tunis, many shops are shut and most public transport is not running.
This is the first general strike in 35 years.
A number of flights to and from Tunis-Carthage airport have been cancelled.
Tunisian state television said universities had been ordered to suspend lectures on Saturday and Sunday, while France said it would close its schools in Tunis.
In the city of Sidi Bouzid, some 10,000 people also gathered to mourn Belaid.
In the central town of Gafsa, tear gas was fired amid clashes between protesters and security forces, witnesses and local media said.
The BBC's Wyre Davies, in Tunis, says tension had been simmering for many months between liberal, secular Tunisians and the Islamist-led government.
He says people who thought the violence and division had ended as the Arab Spring swept through the country two years ago now find themselves protesting on the same streets, fighting with riot police and accusing the Islamist-led government of stealing their revolution.
Critics say that Ennahda has allowed ultra-conservative Muslim groups to impose their will on a bastion of Arab secularism.
Belaid was the victim of the first political assassination in Tunisia since the Arab Spring uprising in 2011.
Thousands of people later rallied outside the interior ministry in Tunis, many chanting slogans urging the government to stand down and calling for a new revolution.