Tunisian security forces have stormed a house in a Tunis suburb to end a stand-off with armed militants, killing six people, officials said.
One gunman and five women were killed in the raid on the house in the Oued Ellil area, officials said.
An interior ministry spokesman described all six as "terrorists". A second gunman and a child were also said to be injured.
The authorities are on high alert, with parliamentary elections due on Sunday.
Security forces had been surrounding the house, where they said at least two gunmen were hiding, since Thursday.
Interior ministry spokesman Mohamed Ali Aroui said on Friday: "Special forces approached the kitchen where the terrorists were hiding.
"The women came out of the kitchen firing."
At the scene. By Naveena Kottoor, Tunis
Tunisians all over the country have been watching the standoff between their security forces and the suspected militants with bated breath. These kinds of incidents are disconcerting for many Tunisians.
According to eyewitnesses at the scene, residents reacted emotionally to the end of the siege - some were crying, others started reciting the national anthem and were seen kissing vehicles that belonged to the security officers involved in the operation.
Details of what the authorities had suspected the group of doing remain unclear.
Meanwhile the police presence in the capital and especially downtown seems to have increased. Today is the final day of election campaigning in Tunisia, and one of the biggest parties is holding a closing rally on the infamous Avenue Bourguiba, in the centre of Tunis.
The Tunisian government had warned in the past that militants might try to disrupt the upcoming parliamentary elections, which mark a crucial milestone in Tunisia's transition from dictatorship to democracy.
It's expected that more than 50,000 security personnel will be deployed all over the country on Sunday to ensure safe voting.
Earlier, negotiations had been held to try to enable women and children in the house to leave, but the two sides were unable to reach an agreement.
One police officer was also killed on Thursday after the two sides exchanged fire.
The killing of five women and the wounding of a child will cast a shadow over Sunday's parliamentary elections, BBC Arab Affairs Editor Sebastian Usher reports.
The authorities had warned of likely militant attacks ahead of the poll, our correspondent adds.
The al-Qaeda-affiliated Okba Ibn Nafaa battalion, active on Tunisia's border with Algeria, has threatened to disrupt the election.
Tunisia's military have been fighting Islamist militants, who have been increasingly active since the 2011 Arab Spring uprising that toppled long-term leader Zine al-Abidine Ben Ali.
Militants have been blamed for a wave of attacks, including the assassinations of two leftist politicians last year which created a political crisis.
Some observers say Tunisia has fared better than other countries that witnessed an Arab Spring.
However, there are claims that Tunisia's radical Islamists have largely taken their battle elsewhere.
According to the Soufan Group, an international strategic consultancy firm, there are more Tunisians among foreign jihadis fighting in Syria and Iraq than from any other single country.