Eyewitnesses said on Monday that a convoy of pickup trucks belonging to Boko Haram militants descended on Dapchi Village in the Bursari area of Yobe State around 6 pm (1700 GMT).
“When they stormed the village, they began shooting and setting off explosives,” said resident Sheriff Aisami. “This drew the attention of the girls in the Girls Science Secondary School, so the girls and the teachers were able to escape before the attackers got into the school.”
Unable to kidnap the girls, the Boko Haram fighters looted the school before fleeing.
It was not clear whether the violence caused any casualties.
Boko Haram notoriously kidnapped more than 200 schoolgirls from the town of Chibok in April 2014.
Separately, Nigeria’s Justice Ministry announced on Monday that more than 200 people have been convicted in Nigeria on charges related involvement with Boko Haram.
Since 2009, the Boko Haram militancy has left at least 20,000 dead and made over 2.6 million others homeless.
Nigerian President Muhammadu Buhari, a former general, came to power in 2015 on a platform of stamping out the Boko Haram militancy. But despite retaking swathes of territory from the group, it continues to stage attacks targeting both civilians and military targets.