Nine members of Tunisia's security forces were killed on Sunday in an attack in the west of the country close to the border with Algeria, state news agency TAP reported.
Militants present in rural parts of Tunisia occasionally target security forces, but Sunday's toll was the highest since 2015, a year in which extremist militants carried out three major attacks.
The police unit from Gar Dimaou in the region of Jendouba was ambushed during a regular patrol, TAP reported.
"The terrorist attackers threw a grenade at the first security car and there were confrontations with firearms," the report cited a security source as saying.
One of the Arab world's most secular nations, Tunisia became a target for militants after being hailed as a beacon of democratic change with an uprising against autocrat Zine El Abidine Ben Ali in 2011.
Some militants operate in remote areas near the border with Algeria, which has been fighting the remnants of a major extremist insurgency in the 1990s.
Two of the attacks in 2015 were against tourists, the first at a museum in Tunis and the second on a beach in Sousse. The third targeted presidential guards in the capital, killing 12.
All three attacks were claimed by Daesh.
Tourism, after collapsing, has since gradually recovered.
The government has maintained a state of emergency, allowing it greater powers in its attempts to dismantle militant networks.