Tunisia's government says a gunbattle between security forces and extremists preparing an imminent attack has left three troops and one of the attackers dead.

Mohamed Ali Aroui, a spokesman for Tunisia's Interior Ministry, says the firefight in the tense region of Sidi Bouzid began around dawn on Monday when security forces set out to trap the men, who were on a motorcycle.

Tunisian security forces regularly confront Islamic extremists in the tense region of Sidi Bouzid, near the Algerian border.