Boko Haram has freed 21 of the nearly 200 girls held by the kidnappers following a negotiation between the group and the Nigerian government, according to reports on Thursday.

The militant organization kidnapped about 300 girls from a school in Chibok in April of 2014. Dozens of the girls escaped on the way to the terrorists' hideouts by jumping off the vehicles.

Boko Haram had posted a video in August, which showed one of the girls saying that some of the kidnapped girls fell victims to the air strikes and about 40 of them had been married over to militants.

The AFP cited local media sources to report that four Boko Haram militants were released in exchange for the girls. However, the government denied any such deal.

"Please note that this is not a swap," said Information Minister Lai Mohammed. "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."

The girls were welcomed by Nigerian Vice President Yemi Osinbajo.

"It's a very exciting news for the whole country," Osinbajo said.

"About an hour ago I met with the 21 who have been brought back. They are reasonably in good health considering the circumstances in which they have been held," Osinbajo told reporters after the meeting with the girls.

Nigerian government said in a statement that the girls were released following negotiations mediated by the Swiss government.

"Switzerland facilitated contacts between representatives of the Nigerian government and intermediaries of Boko Haram on the release of the Chibok girls," said Swiss foreign ministry spokesman Pierre-Alain Eltschinger.

The talks were also facilitated by the International Committee of the Red Cross of Africa [ICRC-Africa], which was a neutral participant in the negotiations.

"Today we transferred 21 of the #Chibokgirls and handed them to the #Nigeria government authorities, acting as a neutral intermediary," ICRC-Africa tweeted.

The girls are scheduled to be examined by a team of doctors and psychologists.

Boko Haram is also reported to have kidnapped thousands of other people including women and children since 2009, but many of the abductions were not so widely reported in international media.

In seven years, the militant group has killed over 30,000 people and displaced over 2.3 million from their homes.