The handover began about 7 a.m. Sunday. Talks to free them had been going on for several months. The Nigerians worked with the government of Switzerland and the International Committee of the Red Cross to secure the release.
On Sunday, some parents quickly departed from Chibok by road on a long journey to the capital to see if their daughters were among the freed. Others stayed behind, joyful but anxious about whether their girls had been liberated.
For those in Abuja, the strain of not knowing the status of their loved ones was particularly acute. One mother of a missing girl sat at a rally in the capital, uncertain whether her daughter was across town, safe and in the custody of the government, or still in the bush in the clutches of the Islamic militants.
When she combed the list made available late on Sunday, the mother, Esther Yakubu, did not find name of her daughter, Dorcas, on the list.
The kidnapping by Boko Haram of nearly 300 girls from a school at a small village in a remote corner of Nigeria is among the countless heinous acts by a group that has carried out of a campaign of murder, rape and the torching of whole villages, largely against some of the world’s poorest people. More than two million people have fled their homes to escape the group’s violence.
Yet it was the singular act in Chibok that trained the world’s sights on this war in Nigeria. Images broadcast by Boko Haram not long after the kidnapping of the veiled girls sitting on the ground in captivity resonated with celebrities and everyday people alike and spread across social media, where a #BringBackOurGirls hashtag became popular.
More than 100 girls are still missing. Twenty-one others were released six months ago, and one kidnapped student was rescued after being found wandering in the forest scrounging for food. Officials did not immediately release their identities.
The newfound freedom of so many of the kidnapped girls is a major victory in the war and is a lift for Mr. Buhari, who vowed when he took office in 2015 to destroy Boko Haram.
While hundreds, if not thousands, of people have been kidnapped by Boko Haram, many of those have been rescued in recent months by military operations that have liberated entire areas from militant control.
The military has penetrated Boko Haram’s large encampments and forest enclaves. Large numbers of the group’s fighters have been killed or jailed in an aggressive campaign that sometimes has ensnared innocent civilians.
On Sunday, it was unclear precisely which or how many Boko Haram suspects had been traded in exchange for the girls’ freedom. Government officials declined to identify the suspects even as some media reported they were high-ranking Boko Haram commanders. Western diplomats said as many as six may have been handed over.
With their forces now scattered throughout the countryside, Boko Haram’s most effective strategy recently has been launching suicide attacks. They have strapped bombs to dozens of young girls and children as young as 7, sending them into crowded markets or camps for people displaced by the war. The group has also attacked military outposts and convoys and still is regarded as a threat to soldiers and civilians in the region.
But with many of their hide-outs gone, fighters can no longer gather in huge groups and instead exist in pockets in Nigeria and in bordering countries. Fighters are suffering from a lack of supplies and food, just like many of the residents, in an area that is experiencing famine-like conditions.
Boko Haram has also suffered infighting that has split the group into factions, one of which has been recognized by the Islamic State.
Another faction, run by Abubakar Shekau, known for his YouTube rants and vicious battlefield activity, was the one holding the 82 girls. Mr. Shekau’s brutality led to a major split in the group last year.
Last week, the Nigerian military said it seriously injured Mr. Shekau, one of many similar claims made by soldiers through the years. Mr. Shekau rushed to release a proof of life video titled “Sermon to the Lying Disbelievers of Nigeria,” that has not been verified as authentic.
Over the weekend as news of the girls’ release circulated, speculation was rampant that the government had paid a steep ransom in exchange for the girls. Government officials did not respond to a request for comment.
Ransom money has fueled the war chests of Al Qaeda offshoots operating elsewhere in West Africa and of the Islamic State. The American and British embassies recently issued a warning that Boko Haram intended to kidnap foreign workers in northeast Nigeria. The move would be a new strategy for a group that for the most part has targeted locals.
Advocates for the kidnapped girls were pushing to make sure the more than 100 still held captive were not forgotten. At a rally, a few dozen people, including several parents of the girls, chanted, “Bring back our girls now and alive!”
Because of an editing error, an earlier version of this article referred incorrectly to the organization that worked with the government of Switzerland to secure the release of the girls. It is the International Committee of the Red Cross, not the International Federation of the Red Cross.