By Felix Onuah
ABUJA (Reuters) - Nigerian President Muhammadu Buhari met 107 schoolgirls on Friday freed by Islamist militant group Boko Haram and promised to secure the release any of their classmates still held in the remote northeast.
Their kidnapping in the town of Dapchi hit Buhari politically by undermining his claims a year before an election to have ended Boko Haram's nearly decade-long insurgency.
A 2015 military campaign drove the group from most of the territory it controlled but much of the northeast remains beyond government rule and insurgents still stage attacks from strongholds near Lake Chad.
"This cheering and hearty development signifies our commitment to the security and well-being of all Nigerians," Buhari said after posing in Abuja for a group photograph with the girls, who spent a month in Boko Haram captivity.
The mass abduction from the girls' school was an apparent copycat of the 2014 abduction of 270 girls from the town of Chibok.
Boko Haram fighters stunned residents of Dapchi on Wednesday when they drove a line of trucks into the town and released the girls, triggering tears and ululations of joy from relatives.
The fighters, who were shouting "God is greatest" in Arabic, gave no reason for their change of heart. The government said it had secured their release "through back-channel efforts and with the help of some friends of the country".
It said no ransom was paid.
Buhari's administration agreed to pay millions of euros to secure the release of some of the Chibok girls, as well as ransoms for kidnapped university staff, after negotiations with Boko Haram aided by Switzerland and the Red Cross.
The kidnapping of the Dapchi schoolgirls may have been carried out by a Boko Haram faction allied to Islamic State in the hope of securing a similar payout, according to one person briefed on the incident.
The freed girls said they had been treated well but said five of the group had died during their time in captivity and one girl had not been released.
Buhari pledged to continue to work for her freedom, as well as that of the remaining Chibok girls.
"While parents of Dapchi girls rejoice because of the reunion with their children, I want to appeal to the Chibok community never to lose hope or despair," he said. "We are determined as never before to bring back our remaining Chibok daughters."
(Writing by Ed Cropley; Editing by Andrew Heavens)