The Nigerian army says a second schoolgirl kidnapped by Boko Haram militants more than two years ago in a raid on her school has been rescued.

"Her name is Miss Serah Luka," army spokesman Colonel Sani Usman said in an emailed statement, saying she was from Madagali in the state of Adamawa. The military released a photograph of the girl, veiled in a long blue hijab common to the region and similar to hijabs worn by other abducted girls seen in Boko Haram videos.

She is the second of 219 girls abducted and held since 2014 to be rescued.

On Tuesday, the first girl, 19-year-old Amina Ali, was found with her 4-month-old baby by civilian vigilantes in the Sambisa Forest area of Borno State. She is now being debriefed by Nigerian military officials.

Ali and her mother met President Muhammadu Buhari Thursday at his residence in Abuja where he said the government is "doing all it can to rescue the remaining Chibok girls."

"Amina's rescue gives us new hope, and offers a unique opportunity for vital information," he said in a statement issued after the meeting.

Nigeria's military has been mounting an offensive in the sprawling, semi-desert scrubland since late April to flush out rebel fighters.

Boko Haram grabbed 300 schoolgirls from their dormitory in the northeastern Nigerian town of Chibok on April 14, 2014 and herded them away during the night. Many escaped after the kidnapping, but more than 200 are still missing.