At least 45 people were killed when Islamist fighters attacked army and police barracks in the Tunisian town of Ben Guerdan near the Libyan border on Monday, the interior ministry said.
Those killed included 28 militants, 10 members of the security forces and seven civilians, the ministry said in a statement.
Authorities warned people to stay in their homes as gunfire erupted in the town centre. A night-time curfew has been imposed in Ben Guerdan from 7pm to 5am (local time).
Islamist militants trained in Libya carried out several attacks on Tunisia last year and the government has increased frontier security.