Tunisia has completed the construction of a barrier along its border with Libya, months after attacks on its capital and a beach resort that killed dozens of tourists.

Defence Minister Farhat Horchani told reporters on Saturday that the construction of the project marked "an important day" for Tunisia in its struggle against "terrorism".

Two attacks claimed by the Islamic State of Iraq and the Levant (ISIL) group last year killed 59 foreign tourists, with Tunisian officials saying the assailants had trained in conflict-ridden Libya where ISIL is active.

"Tunisia is capable of fighting against terrorism in an active and efficient way," Horchani said during a tour of the barrier.

'System of obstacles'

The barrier, which is composed of sand banks and water-filled trenches, stretches some 200km from Ras Jedir on the Mediterranean coast to Dhiba further southwest.

It covers about half the length of the frontier between the two neighbouring countries.

Horchani said a second phase of the project will include installing electronic equipment with the help of Germany and the United States.

He said the barrier, which Tunisia calls a "system of obstacles", has already "proven its efficiency".

"On several occasions we have stopped and arrested people who were trying to smuggle weapons," he said.

In March last year, 21 tourists and a policeman were killed in a gun attack on the National Bardo Museum in Tunis, and in June, an attack at a beach resort near Sousse killed 38 holidaymakers.

READ MORE: Tunisia accuses 'dirty hands' of fuelling unrest

ISIL also claimed a suicide bombing in Tunis in November that killed 12 presidential guards.

At the time, the interior ministry said the explosive used in the attack was the same used to make suicide belts illegally brought from Libya and seized last year.

After November's attack, Tunisia shut its border with Libya for a fortnight, while in December it closed its main Tunis-Carthage international airport to Libyan aircraft as part of increased security measures.

Official sources estimate that as many as 6,000 Tunisians have travelled to fight in Iraq, Syria and Libya, with many opting to join armed groups, including ISIL.