Fighting erupted in the central Sidi Bouzid region, when members of the National Guard raided a house where the militants were holed up, a police source told AFP.
In the ensuing firefight, six police were killed, a medical source and the official TAP news agency said, while two gunmen also died, according to state television.
In the meantime, a keenly awaited speech in which Islamist premier Ali Larayedh was expected to announce his government's intention to step down under the terms of a deal with the opposition was heavily delayed.
And the hard-won national dialogue between Larayedh's ruling Ennahda party and the opposition, which was the centrepiece of the plan for ending the crisis, had yet to begin by early evening, as anti-government protesters massed in the capital.
"We hope that Larayedh will have enough courage to announce the resignation of his government within three weeks to save the country," Hamma Hammami, a leader of the opposition Popular Front party, told AFP.
Parliament speaker Mustapha Ben Jaafar said on Tuesday evening that he expected Larayedh to announce his commitment to resign, paving the way for the launch of the dialogue with the opposition.
"In principle, the government will announce its commitment to respecting the roadmap and its resignation within a few weeks," Ben Jaafar said in a televised interview.
Some 60 opposition MPs who have been boycotting parliament since the the July murder of opposition MP Mohamed Brahmi said they had received assurances the dialogue would begin with a "clear commitment" by Larayedh to quit.
The prime minister has previously said he would step down only after a new constitution has been adopted, in line with the roadmap drawn up by mediators and agreed to earlier this month by his party.
Mediators hope the long-awaited dialogue will mark a crucial step in the country's democratic transition and avert the kind of turmoil that has rocked Egypt since a military coup ousted elected Islamist president Mohamed Morsi in July.
Some 10,000 opposition protesters gathered on the capital's Habib Bourguiba Avenue on Wednesday, waving Tunisian flags and shouting slogans such as: "Government of traitors, resign!"
The deadly fighting in Sidi Bouzid highlighted opposition complaints of inadequate action by the Islamist-led government to rein in jihadist groups, who are blamed for the murder of Brahmi and another opposition MP in February.
The powerful UGTT trade union confederation has called a strike in the central region on Thursday to mourn the slain members of the security forces.
Last week, two policemen were killed in the Beja region west of the capital, and while the authorities said nine "terrorists" were killed in an operation to catch those responsible, the deadly violence has fuelled anti-government sentiment within the security forces.
Dozens of police trade union activists drove Larayedh and President Moncef Marzouki away from a memorial service last Friday for the policemen killed in Beja.
The defence ministry has admitted it lacks the resources to combat militant groups and has struggled to contain them.
Wednesday's planned dialogue comes exactly two years after Ennahda emerged as much the largest party in an election for a National Constituent Assembly, following the 2011 overthrow of veteran strongman Zine El Abidine Ben Ali.
The Islamist group was heavily repressed under the Ben Ali regime.
But since its triumph at the polls, the party has been weakened by accusations that it has not done enough to fix Tunisia's ailing economy and improve living standards.
After three months of political uncertainty and a false start to the national dialogue on October 5, the Tunisian press has grown increasingly critical of the ruling elite and sceptical of efforts to end the crisis.
"A national dialogue starts on the day of a symbolic anniversary. But it has been compromised by the prevalence of suspicion, deceitful language and ambiguity," Le Temps said in an editorial on Wednesday.