Some of the schoolgirls missing after a militant attack on a boarding school in northern Nigeria have been rescued by the military.

Reports say about 100 children were believed to be missing after pupils and teachers fled into the bush outside the town of Dapchi during the attack.

Parents said they saw girls being taken away in trucks.

The attack comes four years after Boko Haram kidnapped more than 270 girls from a school in the town of Chibok.

In a statement, the Yobe state government said an unspecified number of girls had been rescued from the “terrorists who abducted them” and were now with the army.

Reuters news agency quoted parents and a government official as saying that 76 girls had been rescued and at least 13 were still missing

Two girls had been found dead, Reuters said, without specifying how they had died.

Yobe state officials had previously said there was no information to suggest any of the girls had been kidnapped.

Dapchi is about 275km (170 miles) north-west of Chibok.

The jihadists entered the town firing guns and letting off explosives, causing students and teachers to flee into the surrounding bush.

Residents said that Nigeria’s security forces – backed by military jets – later repelled the attack.

Locals living near the school told the BBC that many of the girls who had fled had been found after hiding in surrounding villages – some up to 30km away.

Boko Haram militants have been fighting a long insurgency in their quest for an Islamic state in northern Nigeria.

The conflict is estimated to have killed tens of thousands of people.

The Chibok girls represent a fraction of the women captured by the militant group, which has kidnapped thousands during its eight-year insurgency in northern Nigeria.