Boko Haram has released 82 schoolgirls from a group of 276 they abducted in north-eastern Nigeria three years ago, President Muhammadu Buhari’s office says.
The girls were handed over in exchange for Boko Haram suspects after negotiations.
They will be received by President Muhammadu Buhari in Abuja on May 7, a statement said.
The abduction of the so-called “Chibok girls” triggered a global outcry and sparked a huge social media campaign.
Before the latest release, about 195 of the girls were still missing.
The number of Boko Haram suspects released by authorities remains undisclosed.
Christian pastor Enoch Mark, whose two daughters were among those kidnapped, told AFP: “This is good news to us. We have been waiting for this day. We hope the remaining girls will soon be released.”
It was unclear whether his daughters had been freed.
A statement from a spokesman for President Muhammadu Buhari said he was deeply grateful to “security agencies, the military, the Government of Switzerland, the International Committee of the Red Cross, and local and international NGOs” for playing a role in the operation.
After the Government Girls Secondary School in Chibok, Borno state, was raided in April 2014, more than 50 girls quickly escaped and Boko Haram then freed another 21 in October 2016, after negotiations with the Red Cross.
Last month, President Muhammadu Buhari said the Nigerian government remained “in constant touch through negotiations, through local intelligence to secure the release of the remaining girls and other abducted persons unharmed”.
Many of the Chibok girls were Christian, but were encouraged to convert to Islam and to marry their kidnappers during their time in captivity.
Boko Haram has released a second video showing some of the schoolgirls they abducted from Chibok, northern Nigeria.
The footage released by the Nigerian Islamist group shows some 50 girls and a gunman who demands the release of fighters in return for the girls, and says some girls died in air strikes.
The Nigerian government says it is in touch with the militants behind the video.
Journalist Ahmad Salkida who had contact with Boko Haram has been declared a wanted man by the Nigerian army.
Boko Haram is said to be holding more than 200 of the 276 final-year girls it seized from a school in April 2014.
Non-Muslims were forcibly converted to Islam, and it is feared that many of the schoolgirls have been abused and forced into “marriage” by their captors.
Parents of the missing girls have described their anguish at seeing their daughters in captivity.
The video begins with a shot of a masked man, carrying a gun, speaking to the camera. He says that some of the girls have been wounded and have life-threatening injuries, and that 40 have been “married”.
Speaking in the Hausa language, the gunman says the girls on display will “never” be returned if the government does not release Boko Haram fighters who have been “in detention for ages”.
The footage concludes with footage of bodies, said to be the victims of air strikes, lying on the ground at another location.
The militant also carries out a staged interview with one of the captives, who calls herself Maida Yakubu, in which she asks parents to appeal to the government.
Maida Yakubu’s mother, Esther, is one of several parents of Chibok girls who recently published open letters to their daughters detailing the pain they feel at their children’s absence and their hopes for the future.
Another girl among those standing in the background can be seen with a baby. Some of the girls can be seen weeping as Maida speaks.
Boko Haram has waged a violent campaign for years in northern Nigeria in its quest for Islamic rule, and a faction of the group recently pledged loyalty to ISIS.
Thousands of people have been killed or captured by Boko Haram, whose name translates as “Western education is forbidden”. Many of the girls abducted in Chibok were Christian.
Nigerian Information Minister Alhaji Mohammed insisted the government was doing everything possible to secure the girls’ release.
“We are being extremely careful because the situation has been compounded by the split in the leadership of Boko Haram,” he said.
“We are also being guided by the need to ensure the safety of the girls.”
The video is the first to be seen since CNN obtained footage in April purportedly showing 15 of the girls.
The Nigerian army declared journalist Ahmad Salkida a wanted man after he published details of the new video before it was released.
Ahmad Salkida, who moved to Dubai a few years ago, has written extensively about the inside operations of the group.
The Chibok girls had been thought to be in a heavily forested area of northern Nigeria.
A girl said to be one of those captured, Amina Ali Nkeki, was found wandering in the Sambisa Forest in May by an army-backed vigilante group.
Worldwide ceremonies are being hold to mark one year since more than 200 girls were abducted by militant Islamist group Boko Haram in Nigeria.
A procession is being held in the capital, Abuja, with 219 girls taking part to represent each missing girl.
The abduction of the girls in Chibok in north-eastern Nigeria sparked global outrage, with nations such as the US and China promising to help find them.
There have been sightings of the girls reported, but none has been found.
Boko Haram say the girls have converted to Islam and been married off.
High-profile figures such as Nobel Peace Prize winner Malala Yousafzai and First Lady Michelle Obama were among those who drew attention to their plight on Twitter last year under the #BringBackOurGirls hashtag.
Since then, the activists who began that campaign have spoken of relatives’ anguish at still not knowing what happened to the girls, and have criticized the Nigerian government of outgoing President Goodluck Jonathan for not doing enough to find them.
Nigeria’s incoming president, Muhammadu Buhari, said his government would “do everything in its power to bring them home” but said he “cannot promise that we can find them”.
The six-year Boko Haram insurgency in the north has left thousands dead.
Amnesty International say the militants have abducted 2,000 girls and women since the start of last year, using them as cooks, slaves and fighters.