Six people, including five women, were killed Friday when Tunisian security forces stormed a house where gunmen had been locked in a standoff for over 24 hours with police near the capital, the authorities said.
One gunman was among the dead, while another was hospitalised along with two children, interior ministry spokesman Mohamed Ali Aroui told reporters at the scene.
Tunisian security forces had negotiated with the militants to secure the release of the women and children, who were trapped inside the house in Wadi al-Layl, an outlying eastern suburb of the capital Tunis.
There were dramatic scenes on Thursday night and into Friday, as the militants attempted to blow up the outer wall of the house and provide themselves with an escape route.
The incident follows on from violence on Thursday in which two National Guards were killed - one was killed at the scene of the confrontation.
The other National Guard member died during an early morning clash on Thursday between security services and militants in the central town of Kebili.
According to a ministry statement released on Thursday afternoon, the captured militants were supplied with arms and had been planning to attack a government institution.
The captured gunmen supplied information that led to Thursday's raid on the house in the capital, which police suspected was being used to harbour further militants.
Tunisia is scheduled to go to the polls on Sunday, in the first parliamentary elections since 2011.
Ministry officials said on Thursday that the outbreak of violence was connected to Sunday's vote, and that militants were attempting to hamper Tunisia's democratic transition.