A militant blew himself up as Tunisian security forces surrounded him and another fighter in a house near the Libyan border on Monday, the interior ministry said.
Forces then shot the second man dead in the coastal town of Ben Guerdan, officials added.
A security source said the men were likely to be “two dangerous terrorist elements” that authorities had been searching for. The ministry last week released photos of two men it said could be planning attacks.
Tunisia has been on high alert since 2015, when Islamic State gunmen killed dozens of tourists in a museum in the capital and on a beach in the resort city of Sousse.
Authorities say more than 3,000 Tunisians have left to fight for jihadist groups in Syria, Iraq and Libya – and could pose a risk if they return.