During the operation in the early hours of the morning, police surrounded a house in Tunisi's northern coastal Raoued suburb where they had received information that an armed group was holed up.
"They had suicide belts and explosives and were well armed," said interior ministry spokesman Mohamed Ali Aroui without naming the group to which the men belonged.
Arabic satellite TV channel Al-Arabiya reported that up to four Islamist militants had died in the police raid.
The police officer was killed after the militants opened fire on police, according to the interior ministry.
Tunisia formally celebrates a new constitution on Friday, seen as a milestone in its progress to democracy three years after its uprising inspired revolts across the Arab world.
The North African country has a new caretaker government that took over after the moderate Islamist Ennahda party stepped down in a compromise to end a political crisis.
The threat of Islamist militancy is among the new government’s main challenges, underscored by a suicide blast at a beach resort in late 2013 that was the first such attack in a decade.
Radical Islamists are also implicated in the shooting deaths of two left-wing politicians last year.
Tunisian armed forces have since last year cracked down on the Al-Qaeda aligned Ansar al-Shariah faction, listed as a terrorist organisation by the United States.
Shootout between security forces and militants are being reported almost every month and many militants have smuggled in weapons from neighbouring Libya.