A firefight between security forces and suspected Islamists holed up in a building in the Tunisian capital left a policeman and seven militants dead, the interior ministry said on Tuesday.
"Seven terrorists died. A member of the National Guard was killed and another wounded," a ministry source told AFP.
"The operation is over," the source added.
The clash, which began on Monday afternoon and lasted until mid-morning on Tuesday, came as Tunisians prepared to mark the first anniversary on Thursday of the murder of opposition politician Chokri Belaid by suspected jihadists.
Special units of the National Guard surrounded the building in the Tunis suburb of Raoued on Monday after a tip-off that "heavily armed" militants were inside the house, officials said. The gunmen refused to give themselves up.
Witnesses at the scene said they heard the militants firing automatic weapons, before the security forces announced the "victory" of their operation.
The ministry has not yet given details of the identity or affiliation of the gunmen.
Police had closed off access to the area, which lies not far from a popular beach, an AFP photographer reported.
Signup to our newsletter and follow us on Facebook and Twitter!
Since the 2011 revolution, Tunisia has been rocked by sporadic violence linked to militant Islamists who were suppressed under the regime of ousted strongman Zine El Abidine Ben Ali.
The authorities blamed the separate killings last year of Belaid and Mohamed Brahmi, another opposition politician gunned down by militants, on Ansar al-Sharia, a radical Salafist group with suspected links to Al-Qaeda.
Also last year, around 20 members of the security forces were killed during operations targeting a group of Islamist militants in the Chaambi mountains on the border with Algeria.
Relatives of Belaid are to hold a press conference on Thursday followed by a candlelit vigil in Tunis to commemorate the anniversary of his death.
Activists are also planning a rally on Saturday to mark his funeral one year ago, which turned into a massive rally against the Islamist-led government.
The murder of Belaid -- a virulent critic of the ruling Islamists, who was shot dead outside his home in a Tunis suburb on February 6, 2013 -- was a turning point in Tunisia that sparked deadly protests and plunged the country into turmoil.
It set off the worst political crisis since the country's Arab Spring uprising, compounded by Brahmi's assassination several month later, and ultimately forced the Islamist-led coalition to step down under pressure from the mainly secular opposition.
Under a hard-won deal between the two sides, technocrat premier Mehdi Jomaa took office last month at the head of a government of independents charged with leading the North African country to fresh elections later this year.
Jomaa's swearing-in, and the adoption of a long-awaited new constitution three days earlier, were seen as key steps in getting Tunisia's transition back on track.