A Tunisian soldier has killed seven other troops after opening fire at a military base in the capital Tunis, state TV said.

At least another 10 soldiers were wounded at the Bouchoucha base on Monday before the attacker was shot dead himself.

It was not immediately clear what triggered the incident, but it caused alarm in a capital city still on edge after an attack in March by gunmen at the Bardo national museum.

Mohamed Ali Aroui, a spokesman for the interior ministry, said the incident was not being viewed as a terrorist attack.

"The incident which took place at the Bouchoucha barracks is not connected with a terrorist operation," Aroui said.

A local school was evacuated after the shooting started at the base which is not far from the Bardo area.

Tunisian forces have been carrying out operations against armed groups since March when two gunmen opened fire on tourists at the Bardo museum, killing 21 foreigners in the worst attack in Tunisia in more than a decade.

Al Jazeera's Nazanine Moshiri, who is reporting from Tunis, said the city was "very much on edge at the moment and this latest incident will do nothing to calm fears here".

"What happened will do nothing to reassure people already stunned by the Bardo museum attack," Moshiri said.

"The army is supposed to be one of the most trusted institutions in the country. It's responsible for protecting Tunisia's borders from the instability and violence in Libya."

Since the overthrow of strongman Zine El Abidine Ben Ali in 2011, several groups have launched attacks in the country.