Two Tunisian national guards were killed and one injured in the northwest city of Goubellat, in the Beja governorate, by Islamist militants, according to security sources.
The Ministry of Interior described the attackers as "a group of armed terrorists".
Gunmen also attacked a police station in Ghar Dimaou near the Algerian border but fled without causing any casualties.
The Beja national guard told Tunisia Live that the militants were a group of strict Sunni Muslim Salafists who are being hunted in the mountains.
Tunisia's moderate Islamist-led government has long battled the local branch of Ansar al-Sharia, which was branded a terrorist organisation after the alleged murder of two secular opposition leaders in 2013.
Islamist fighters linked to the Ansar al-Sharia have carried out occasional attacks on security forces in the region bordering Algeria.