Tunisia's prime minister has said a lead suspect behind the Bardo museum attack that left 22 people dead has been killed in a security operation, as tens of thousands of Tunisians marched through the capital to denounce violence.

Prime Minister Habib Essid said on Sunday that Khaled Chaieb was one of nine suspects killed in an operation in Gafsa, near the Algerian border, state news agency TAP reported.

"The Gafsa operation was crowned with great success. It is a delicate operation implemented for the first time since the start of the fight against terrorism," Essid said.

Chaieb, who also known as Luqman Abu Saqr, was suspected of leading or helping to lead the March 18 attack on the National Bardo Museum.

Officials had accused Chaieb, an Algerian, of masterminding the attack and his group, the Okba Ibn Nafaa Brigade, of organising the attack, despite a claim of responsibility from the Islamic State of Iraq and the Levant.

Twenty-two people, mainly foreigners, and two gunmen were killed in the March 18 attack on the National Bardo Museum.

The announcement of Chaieb's death came as thousands marched on the streets of Tunis to denounce violence.

The demonstrators went from the iconic Bab Saadoun Square to the Bardo museum where a stone tablet was dedicated to the memory of the victims.

"The Tunisian people have proven that they will not give in to terrorism. My thanks go out to all and I tell the Tunisian people: 'Forwards. You are not alone'," President Beji Caid Essebsi said after joining the march with foreign dignitaries.

French President Francois Hollande, Italian Prime Minister Matteo Renzi and Palestinian leader Mahmoud Abbas were among the figures attending.

"We must all fight against terrorism," Hollande told reporters after the march. "Tunisians wanted this international solidarity."

One of the most secular countries in the Arab world, Tunisia recently completed its lengthy transition to democracy after the 2011 uprising against Zine El Abidine Ben Ali, but security remains a key worry due to the emergence of armed groups.

Thousands marched from the iconic Bab Saadoun Square to the Bardo museum where a stone tablet was dedicated to the memory of the victims [AFP]

Source: Agencies