Two Libyans have been arrested over claims they sexually assaulted three British aid workers earlier this week.
The workers were apparently abducted at a checkpoint near the city of Benghazi and held for hours before being freed on Wednesday.
The women were in a convoy travelling overland to Gaza.
Defence official Abdul Salam Barghathi told the BBC the arrested men were soldiers. He described their behaviour as "an individual, isolated act".
Officials quoted earlier said four people had been arrested and two women had been assaulted.
But Mr Barghathi, who is based in Benghazi, said three women had been attacked.
He said two suspects had been arrested, but two were still on the run.
The BBC's Rana Jawad in Tripoli says Friday prayer sermons in some mosques began with condemnations of the assault.
The women were in a convoy driving from Morocco to Gaza.
They reached the Egyptian border, where officials refused permission for them to cross.
Five members of the convoy, including the women, took a taxi to Benghazi in the hope of catching a flight back to the UK.
They were stopped at a checkpoint, abducted and the women were allegedly sexually assaulted.
UK ambassador Michael Aron told the BBC that the incident was horrific and the Libyan authorities were investigating.
The group of aid workers were taken to the Turkish consulate in Benghazi after their release. British officials said they had now returned to the UK.