LAGOS, Nigeria — One of the girls kidnapped by Boko Haram more than two years ago during a mass abduction at a school in Nigeria has been found, community leaders in the area said on Wednesday.

The girl, Amina Ali, was wandering in the forest when members of a vigilante group lying in wait to ambush a Boko Haram camp came across her, said Aboku Gaji, a local vigilante commander.

The kidnapping of nearly 300 girls during exam time at their boarding school in the Nigerian town of Chibok shocked the world and helped galvanize pressure on the government to fight Boko Haram, an Islamist militant group that has terrorized parts of northern Nigeria for years.

Some girls managed to escape shortly after the fighters stormed their school and hauled their classmates away. But Ms. Ali is the first girl to be found since the early days of the episode.