Gunmen have kidnapped hundreds of Tunisians in northwestern Libya to demand the release of a local Libyan official arrested in Tunisia this week, families and local sources said on Tuesday.

An official from Sabratha, a coastal town between Libya's capital Tripoli and the Tunisian border whose Roman ruins are a UNESCO World Heritage Site, was arrested along with another Libyan at Tunis airport on Saturday. They had flown to Tunis on a visit organized by United Nations, the council said. Tunisian officials were not immediately available for comment.

Relatives of the Tunisians being held in Sabratha are speaking out about the situation.

"Gunmen kidnapped my father.... We talked with the kidnappers over the phone and told us they would release them only when Tunisia frees the Libyan officials arrested in Tunisia," the daughter of one of the detained Tunisians told local radio. "I ask the authorities to intervene."

Mustapha Abd El Kebir, a Tunisian human rights activist with contacts in Libya, said that dozens of Tunisians were being held in Sabratha.

BBC North Africa correspondent Rana Jawad later tweeted that Hassan al Dabbashi, the head of Sabratha's military council — which she qualified as a militia — said that around 300 Tunisian workers had been detained "for their own protection." The official said the individuals would be let go once Tunisian officials released Sabratha's mayor, whom Jawad identified as the official who was arrested in Tunisia during the UN Development Program local governance workshop.

1."Approximately 300 #Tunisia-n workers "r being held in" #Libya's Sabratha- head of Sabratha's Military Council [militia] tell the BBC. — Rana Jawad (@Rana_J01) October 13, 2015

Jawad said that she had spoken with two of the detained people while in the presence of what she called an armed group, with the individuals saying they had not been mistreated. A while later she reported that 30 of the workers had been released "as a gesture of goodwill," though this has not yet been confirmed.

Head of armed group that abducted 'approx. 300' tunisian workers in — Rana Jawad (@Rana_J01)October 13, 2015

Armed groups in chaotic Libya often act with impunity because of a security vacuum in which two rival governments and their armed backers fight for control of the North African state four years after Muammar Qaddafi's fall from power.

Tunisians and other foreign nationals have been kidnapped or detained in the past to pressure their governments to release Libyans held overseas. An armed group stormed the Tunisian consulate in Tripoli and kidnapped 10 staff this year before releasing them. Tunisia closed the consulate after the kidnapping.