A Nigerian court has released 475 people allegedly affiliated with Boko Haram for rehabilitation, the justice ministry said, as the country’s biggest legal investigation of the militant Islamist insurgency continued.

The first person convicted for the kidnapping in 2014 of Chibok schoolgirls, sentenced to 15 years’ imprisonment last week, was also handed an additional 15-year sentence, to run back-to-back, the ministry said in a statement.

More than 20,000 people have been killed and 2 million forced to flee their homes in north-eastern Nigeria since Boko Haram began an insurgency in 2009 aimed at creating an Islamic state.

Humanitarian groups have criticised the Nigerian authorities’ handling of those detained for infringing on the suspects’ rights. Some of those whose cases were heard last week in a detention centre in central Nigeria had been held without trial since 2010, according to the justice ministry statement.

“The prosecution counsel could not charge them (with) any offence due to lack of sufficient evidence against them,” it said.

In October, the ministry said 45 people suspected of links with Boko Haram had been convicted and jailed. A further 468 suspects were discharged and 28 suspects remanded for trial in Abuja or Minna.