Nigerian president Muhammadu Buhari met 82 Chibok schoolgirls newly freed from Boko Haram extremists - then made a shock announcement that he was leaving immediately for medical checks in London as fears for his health continue.
"We've always made it clear that we will do everything in our power to ensure the freedom & safe return of our daughters" and all captives of Boko Haram, Mr Buhari said on his Twitter account.
Minutes later, the 74-year-old president startled Africa's most populous nation with the news of his departure.
Mr Buhari, who has missed three weekly cabinet meetings, spent a month and a half in London on medical leave earlier this year and said he had never been as sick in his life.
The exact nature of his illness remained unclear.
"There is no cause for worry" about this latest medical leave, a statement from his office said, adding that the length of his stay in London would be determined by his doctors.
Photos released by the government showed the thin president standing and addressing the Chibok schoolgirls at his official residence on Sunday evening, a day after their release.
"The president was delighted to receive them and he promised that all that is needed to be done to reintegrate them into the society will be done," adviser Femi Adesina said.
"He promised that the presidency will personally supervise their rehabilitation."
The young women have been handed over to government officials who will supervise their re-entry into society, Mr Adesina said.
The International Committee of the Red Cross, which helped negotiate the girls' release along with the Swiss government, said they would be reunited with their families soon.
Five Boko Haram commanders were released in exchange for the girls' freedom, a Nigerian government official said.
Neither Nigeria's government nor Boko Haram, which has links to the Islamic State group, gave details about the exchange.
Parents of the schoolgirls were waiting for a government list of names of those who had been freed.
Some parents gathered in the capital Abuja to celebrate the release, while others expressed anxiety over the fate of the 113 girls who remain missing after the mass abduction from a Chibok boarding school in 2014.
The Rev Enoch Mark, whose two daughters have been among the missing, was still awaiting word if they were among those freed.
He said he considered all 82 of the girls to be his daughters "because most of them worship in my church".
Some parents did not live long enough to see their daughters released, underscoring the tragedy of the three-year saga, and the recovery process is expected to be a long one for the girls, many of whom endured sexual assault during their captivity.
"They will face a long and difficult process to rebuild their lives after the indescribable horror and trauma they have suffered at the hands of Boko Haram," said Pernille Ironside, acting representative of Unicef Nigeria.
Boko Haram seized a total of 276 girls in the 2014 abduction.
Girls who escaped early on said some of their classmates had died from illness and others did not want to come home because they had been radicalised by their captors.
Human rights advocates also fear some of the girls have been used by Boko Haram to carry out suicide bombings.
Last year, a first group of 21 Chibok girls was freed in October, and they have been in government care for medical attention, trauma counseling and rehabilitation.
Human rights groups have criticised the decision to keep the girls in custody in Abuja, nearly 560 miles from Chibok.
It was not immediately clear whether the newly-freed girls would join them.
They should be quickly released to their families and not be subjected to lengthy government detention, Amnesty International's Nigeria office said, adding that the girls did not deserve to be put through a "publicity stunt" and needed privacy.
Boko Haram has abducted thousands of people during its eight-year uprising that has spilled across Nigeria's borders, but the Chibok mass kidnapping horrified the world and brought the extremist group international attention.
The failure of Nigeria's former government to act quickly to free the girls sparked a global Bring Back Our Girls movement and then US first lady Michelle Obama posted a photo with its logo on social media.
The Bring Back Our Girls campaign said Sunday it was happy that Nigeria's government had committed to rescuing the 113 remaining schoolgirls, and urged the president to "earnestly pursue" the release of everyone held by Boko Haram.
Late last year Mr Buhari announced Boko Haram had been "crushed", but the group continues to carry out attacks in northern Nigeria and neighbouring countries.
Its uprising has killed more than 20,000 people and driven 2.6 million from their homes, with millions facing starvation.