Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Nigeria's government said Thursday that 21 of the schoolgirls whose abduction triggered the #BringBackOurGirls campaign have been released after more than two years in captivity by Boko Haram.

The liberation of the so-called "Chibok girls" came after negotiations between the Nigerian government and Boko Haram, according to Nigerian government spokesman Mallam Garba Shehu.

Shedu didn't say what Boko Haram received in return, but the BBC reported that the government handed over of four imprisoned militants as part of the deal.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

As I depart Abuja for Germany on an Official Visit, I welcome the release of 21 of our Chibok Girls, following successful negotiations. — Muhammadu Buhari (@MBuhari) October 13, 2016

"The president welcomes the release of the girls but cautioned Nigerians to be mindful of the fact that more than 30,000 fellow citizens were killed via terrorism," Shehu said on Twitter, referring to an estimated death toll resulting from Boko Haram's years-long campaign in the country.

The #BringBackOurGirls campaign said in a statement it was "extremely delighted" at the girls' release but urged the government to "fulfill the pledge it made to rescue ... every other abducted citizen of our country."

The girls' release was first confirmed to NBC News earlier Thursday in an email from Nigerian government spokesman Femi Adesina.

Map showing the location of Chibok, Nigeria. Google Maps

According to Shehu, the negotiations were brokered by the Swiss government and the International Committee of the Red Cross (ICRC).

A spokeswoman for the ICRC said that while it was not actually involved in the negotiations, the organization did act as an neutral intermediary.

1/2 Today we transferred 21 of the #Chibokgirls and handed them to the #Nigeria government authorities, acting as a neutral intermediary. — ICRC Africa (@ICRC_Africa) October 13, 2016

The group of 21 is part of more than 200 girls whose mass kidnapping from their school in April 2014 sparked international outrage.

The campaign to find the Chibok girls, as they came to be known, was led under the #BringBackOurGirls hashtag and was backed by Michelle Obama, Rihanna and Ellen DeGeneres.

Our prayers are with the missing Nigerian girls and their families. It's time to #BringBackOurGirls. -mo pic.twitter.com/glDKDotJRt — The First Lady (@FLOTUS) May 7, 2014

In May this year, one of these girls was found in Nigeria's Sambisa Forest, the army and #BringBackOurGirls campaigners said. A day later, the army said another girl had been found, but the campaign organization later said she was not among the original Chibok group.

Human rights organizations estimate some 2,000 people have been kidnapped during Boko Haram's insurgency.