Am image from a video made public on April 14 apparently shows some of the more than 200 schoolgirls abducted by Boko Haram in 2014. (AFP/Getty Images)

The Nigerian government announced Thursday that it had secured the release of 21 of the more than 200 Chibok schoolgirls who were kidnapped by Boko Haram militants in April 2014.

The mass abduction in the northeastern Chibok town thrust Nigeria’s Islamist insurgency into a global spotlight and underscored the challenges that security forces face in battling the militants.

A government spokesman said the release of the 21 captives was part of ongoing negotiations between Boko Haram and Nigerian officials.

It was “brokered by the International Red Cross and the Swiss government. The negotiations will continue,” the spokesman, Mallam Garba Shehu, said on Twitter.

Shehu added that the girls were “very tired coming out of the process.” Their names were not made public.

The International Committee of the Red Cross confirmed its role in the swap.

“Today we transferred 21 of the #Chibokgirls and handed them to the #Nigeria government authorities, acting as a neutral intermediary,” the ICRC said on Twitter.

Although the world’s attention was drawn to the Chibok schoolgirls in 2014, thousands of other women and girls have been abducted by Boko Haram in similar circumstances. Many of them were forcibly married to fighters and moved into what were effectively rape camps across northeastern Nigeria.

In August, Boko Haram posted a video purporting to show recent footage of dozens of the Chibok schoolgirls, saying that some have been killed in airstrikes. In May, one of the missing girls was found wandering in the bush.

The government has been negotiating with Boko Haram for months, officials say. But with fighters dispersed across a vast stretch of northeastern Nigeria, including the dense Sambisa forest, it was unclear whether the girls were being held together or whether there was a viable point of contact within the insurgency.

Boko Haram has split into two factions over the past year, with the group holding the schoolgirls based mostly in the southern part of Borno state and another group based farther north, near the border with Niger. President Muhammadu Buhari, who was elected last year partly for his pledge to defeat the insurgency and rescue the girls, has been criticized for not doing more.

In May, a pro-government vigilante group found one of the schoolgirls, Amina Ali, wandering in the Sambisa forest. She was taken to the capital, Abuja, where she met Buhari and other officials in front of cameramen — a move that was criticized by many Nigerians.

Insurgents are not the only threat to the region. Northeastern Nigeria is beset by one of the world’s biggest hunger crises, with many on the brink of starvation.