Libya’s authorities have released some former captives of the so-called militant group, the islamic state, who were captured and enslaved by the militants in Sirte, and had been held in detention since the jihadist group lost the city in December.

The group, 28 Eritreans and 7 Nigerians most of them women and children, escaped from Sirte while forces from the nearby city of Misrata, battled to oust the militants late last year.

Following their escape, they were investigated for possible ties to the group and held for several months in a prison in Misrata.

The Libyan attorney-general’s office says the women had been cleared of any wrongdoing in mid-February, but their release was delayed for several more weeks, with no explanation.

The former captives have been taken to a shelter for medical checks.

The Nigerians, 5 women and 2 children, will be able to apply for asylum or be offered repatriation.