A schoolgirl believed to have been abducted by Boko Haram three years ago has been rescued by government troops while "escaping from captivity", Nigerian officials said on Wednesday.

Femi Adesina, a presidential spokesman, said the girl was found less than two weeks after 82 others were released by their abductors in exchanged for five Boko Haram commanders.

"The details are yet to fully unravel. But in terms of is it true? Yes, it is true. I learnt she is already being brought to [the capital] Abuja but I have not seen her," Adesina told reporters.

He added that Vice President Yemi Osinbajo, who is acting president while President Muhammadu Buhari is on sick leave, informed senior ministers of the rescue at the weekly cabinet meeting.

Presidential aide Bashir Ahmad also confirmed the rescue on Twitter, saying the girl was "found by Nigerian troops while she was escaping from captivity".

The schoolgirl is believed to have been among the 276 pupils seized by Boko Haram from a government school in the town of Chibok in April 2014.

Fifty-seven escaped in the immediate aftermath. Of the 219 who did not manage to flee, 106 have either been released or found, leaving 112 still missing.

READ MORE: Nigerians demand 'bring back our girls' years later

The government has said that talks for the release of the remaining schoolgirls still missing are under way.

The abduction drew international attention to the armed group, while the Nigerian government's failure to act quickly to free the girls spurred a global Bring Back Our Girls movement.

About 2,000 girls and boys have been abducted by Boko Haram since 2014, with many used as sex slaves, fighters and even suicide bombers, according to Amnesty International.

Some 20,000 people have been killed and about 2.3 million displaced since Boko Haram started its armed campaign in 2009.