Tunisian troops stopped two bomb-laden cars crossing from Libya and seized arms and documents bearing the symbol of Islamic State, as security tightened following two major attacks this year, the government said on Thursday.
Last month, Tunisian authorities had warned of possible car bombings in Tunis and banned traffic in parts of the city after getting intelligence reports about potential attacks in the capital.
Authorities said three suspect vehicles were tracked on Wednesday after crossing the border and troops opened fire to stop them. Two were halted and a third fled back across the Libyan border.
"The army has dismantled the car bombs, which were rigged to detonate, one with a bomb belt, the other with rocket explosives," the Interior Ministry said in a statement.
An security official said troops had opened fire on the vehicles to block them fleeing back to Libya. They also recovered 10 Kalashnikovs, rocket-propelled grenades, explosives, Libyan telephones cards and documents
Tunisian forces have been on high alert since March, when Islamist gunmen killed 21 tourists in an attack at the Bardo Museum in Tunis. In June, 38 foreigners were killed in an assault on a Sousse beach hotel in June.
Islamic State, the Islamist militant group controlling parts of Iraq and Syria claimed responsibility for both attacks. Officials said the attackers were trained in jihadist camps over the border in Libya.
Tunisia's government last July also started building a wall along its border with Libya to stop Islamist militants slipping across the frontier from Libya, where Islamic State has gained ground in the country's chaos.
Four years after its uprising ousted autocrat Zine El-Abidine Ben Ali and inspired the "Arab Spring" protests, Tunisia has a new constitution, free elections and a coalition government with secular and Islamist parties.
But more than 3,000 Tunisians have left to fight for Islamist militant groups in Syria, Iraq and neighbouring Libya. Some of those jihadists have threatened to return home and carry out attacks on Tunisian soil.