All flights to and from Tunisia will be cancelled on Friday after a general strike was called in protest at the killing of a prominent opposition figure, the civil aviation office said.

"All flights to and from Tunisia will be cancelled because the workers at the airport responded to the calling of the general strike", a spokesman said.

Opposition politician Mohamed Brahmi was shot dead in the second such assassination this year, setting off violent protests against the Islamist-led government in the capital and elsewhere.

Mr Brahmi, who was in the nationalist and secular Popular Party, was a vocal critic of the government.

The 58-year-old was also a member of the Constituent Assembly charged with drawing up the country's new constitution.

The politician's wife, Mbarka Brahmi, said he had left the house after receiving a telephone call. She heard shots and found his body lying on the ground outside as two men fled on a motorcycle.

Tunisia's biggest labour organisation, UGTT called for a general strike. Secretary-general Hussein Abbasi predicted that the assassination would lead the country into a "bloodbath."

Thousands of people protested outside the Interior Ministry in Tunis and at a hospital in the Ariana district where Mr Brahmi's body had been taken. "Down with the rule of the Islamists," they chanted, and demanded that the government resign.

Big crowds accompanied Mr Brahmi's body when it was taken later for autopsy at another Tunis hospital.

Despite the presence of hundreds of soldiers and police, protesters smashed cars and broke some windows of the hospital in Ariana, witnesses said.

Similar demonstrations erupted in the southern town of Sidi Bouzid, the cradle of the Tunisian revolution, where protesters set fire to two local Ennahda party offices.

"Thousands have taken to the streets. People have blocked roads and set tyres alight," said Mehdi Horchani, a resident of Sidi Bouzid. "People are very angry."

Police fired teargas to disperse protesters who stormed a local government office in the Mediterranean port of Sfax, 270km southeast of Tunis, witnesses said.

Tunisia's political transition since the revolt that toppled Ben Ali has been relatively peaceful, with the moderate Islamist Ennahda party sharing power with smaller secular parties.

But the government has struggled to revive a stuttering economy and has come under fire from secularists who accuse it of failing to curb the activities of radical Salafi Islamists.

A protest movement known as Tamarod, modelled on the Egyptian group of the same name that orchestrated the anti-Mursi demonstrations, has called for rallies to topple the government.

Prime Minister Ali Larayedh condemned the assassination, but said: "We are against all the calls to dissolve the government and the Constituent Assembly to create a (power) vacuum."

He also drew a link to the upheaval in Egypt, saying in a televised address that the assassins had aimed to use events there "to try to undermine our process and derail it, and take the country into the unknown, whether it is chaos, fighting or civil war or a return to despotism or a return to square one".