In this photo released by the Nigeria State House, freed Chibok school girls during a meeting with  Nigeria Vice President ,Yemi Osinbajo, in Abuja, Nigeria, Thursday, Oct. 13, 2016.  Twenty-one of the Chibok schoolgirls kidnapped by Boko Haram more than two years ago were freed Thursday in a swap for detained leaders of the Islamic extremist group — the first release since nearly 300 girls were taken captive in a case that provoked international outrage.( Sunday Aghaeze, Nigeria State House via AP )
In this photo released by the Nigeria State House, freed Chibok school girls during a meeting with Nigeria Vice President ,Yemi Osinbajo, in Abuja, Nigeria, Thursday, Oct. 13, 2016. Twenty-one of the Chibok schoolgirls kidnapped by Boko Haram more than two years ago were freed Thursday in a swap for detained leaders of the Islamic extremist group — the first release since nearly 300 girls were taken captive in a case that provoked international outrage.( Sunday Aghaeze, Nigeria State House via AP ) Credit: Sunday Aghaeze

Kano, Nigeria — Twenty-one of the 218 missing Nigerian schoolgirls abducted in 2014 by Boko Haram militants were released on Thursday as a result of negotiations with the extremist group, government officials said.

The girls were released in northern Borno State, rescued by a military helicopter and transported to the state capital, Maiduguri, said Mallam Garba Shehu, spokesman for President Muhammadu Buhari.

Officials said the International Committee of the Red Cross and the Swiss government acted as neutral intermediaries leading to the first major breakthrough since the girls’ kidnapping in April 2014.

Nigeria’s minister of information and culture, Lai Mohammed, told reporters in Abuja that the rescued girls were being flown to the nation’s capital for treatment and trauma counseling.

“Ahead of their arrival, we have assembled a team of medical doctors, psychologists, social workers, trauma experts to properly examine the girls, especially because they have been in captivity for so long,” he said. “They will also be adequately debriefed.”

Mohammed said the government was in the processing of contacting parents and relatives. He denied media reports based on unnamed officials that the girls were swapped for Boko Haram commanders.

“As we have always said, we have been working on the safe release of the girls and following all the leads available,” Mohammed said. “Please note that this is not a swap. It is a release, the product of painstaking negotiations and trust on both sides. We see this as a credible first step in the eventual release of all the Chibok girls in captivity.”

Shehu said in a statement on Twitter: “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 by terrorism.”

Nearly 200 girls still are missing, some believed to have been killed in Nigerian air force strikes on militants’ positions. Shehu said negotiations were continuing to secure the release of the other girls.

Before the latest release, only one of the missing 219 schoolgirls kidnapped from the town of Chibok had been freed. Amina Ali Nkeki was found in May with her Boko Haram husband in the Sambisa forest, a stronghold of the extremist militia.

The 276 girls initially abducted were sleeping at a school in preparation for examinations, at a time when Boko Haram had been targeting schools, killing teachers, firebombing dormitories and warning schools to close.

Several dozen escaped, but the remaining 219 were taken into the Sambisa forest by gunmen.

The group’s leader, Abubakar Shekau, announced in a video shortly afterward that the girls were “slaves.”

Like thousands of other women and girls abducted in northern Nigeria in recent years, the girls are believed to have been forced into marriage with Boko Haram fighters.