Tunsian President Beji Caid Essebsi has said any attack on an anti-Islamic State (Isis) border fence with Libya could be met by a military response.
Essebsi announced the creation of a 168km wall along Tunisia's border with Libya in the aftermath of June's bloody attacks on tourists in Port Sousse.
Britons made up the majority of the 38 killed by Tunisian-born and Libyan-trained jihadi Seifeddine Rezgui.
Speaking in an interview on Tunisia's Attasia TV channel, Essebsi said: "Any possible attack against the fence that is being constructed on the Tunisian-Libyan border could have a military response."
The wall is expected to be finished by the end of 2015.
The Tunisian premier reiterated his worry regarding the terror threat posed by militants in Libya, saying the he was "very concerned about the situation in Libya and the militia belonging to IS active there".
Prior the June's attack, it was presumed Tunisia's most pressing terrorist threat was posed by fighters returning from Iraq and Syria.
However, the reported presence of international terror figures like Mokhtar Belmokhtar and Mohammed Emwazi, aka Jihadi John, in Libya have increasingly marked that country as a safe haven out of the reach of intelligence gatherers and the security services.
Tunisia's former most-wanted jihadist Seifallah Ben Hassine, who was responsible for a litany of terror attacks including an assault on the US Embassy in 2012, was killed in Libya by US airstrikes.
Hassine, at one time a senior lieutenant of Osama Bin Laden, was the founder of Ansar Al-Sharia, a potent extremist Al-Qaeda affiliate with branches in Tunisia and Libya. Its Libyan offshoot was responsible for the 2012 Benghazi consulate attack that killed US ambassador Chris Stevens.
The jihadi hoped to replicate the Benghazi attack in his native Tunisia with his 2012 attack. Two were killed and at least 29 wounded in the assault.
While Tunisia is keen to continue with its plan to build its wall, it has been criticised by Libya's government in Tripoli. Libya has said "no unilateral decision can ensure safety," adding that Libya is also a victim of terrorism.