Tunisia's foreign minister says 10 diplomats detained after their consulate in Tripoli was stormed have been released and will soon be back in Tunis.

Taieb Baccouche announced on Friday the release and imminent return of the diplomats, taken last week by the Libya Dawn militia.

Libyan officials said the detention of the diplomats was linked to the arrest of a Libyan militia leader, Walid Klib, in Tunisia. A Tunisian court on Wednesday ordered Klib released and extradited to Libya.

Baccouche told Tunisian radio, however, that the release of the diplomats and the extradition of Klib were not related.

Tunisian media said Klib has since been sent back to Libya.