Earlier, witnesses said that a man blew himself up in the Mnihla area in Tunis after being surrounded by the police.
The spokesman said police opened fire on the man, whom authorities described as a wanted militant called Aymen Smiri.
Two suicide bombers blew themselves up in separate attacks on police in Tunis on Thursday, killing one police officer and wounding several other people. Islamic State claimed responsibility for the two attacks.
Tunisia has been battling militant groups operating in remote areas near the border with Algeria since an uprising overthrew autocratic leader Zine Abidine Ben Ali in 2011. High unemployment has also stoked unrest in recent years.
Last October, a woman blew herself up in the center of Tunis, wounding 15 people including 10 police officers in an explosion that broke a long period of calm after dozens had died in militant attacks in 2015.
More about: #Tunis