A gunbattle erupted after police surrounded a house in a northern suburb of the capital in an attempt to arrest a group of suspected militants hiding there.
Preliminary tests showed Kamel Ghadghadi, who was suspected in the assassination of two opposition leaders, was killed during the raid in which a policman also died.
Interior Ministry spokesman Mohamed Ali Aroui said: "They had suicide bomb belts and explosive material and they were well-armed."
Since last year, Tunisian armed forces have cracked down on the hardline Islamist Ansar al-Sharia faction, which Washington has listed as a terrorist organisation and whose leader has declared allegiance to al Qaeda.
Tunisia formally celebrates a new constitution on Friday, with French President Francois Hollande and other dignitaries invited to the ceremony to mark the North African country's progress to democracy.
Three years after its uprising inspired the Arab Spring, Tunisia is led by a new caretaker government that took over from the moderate Islamist Ennahda party.