Police say a female suicide bomber detonated explosives outside the library of a government school in western Nigeria, killing herself and injuring three others.

It was the first such attack in more than two years in the western state of Niger.

Police Deputy Superintendent Ibrahim A. Gambari said the unidentified girl or woman was inside the Federal College of Education at Katongora and approaching the library when the explosion went off Wednesday.

Several previous attempts by female bombers have been bungled, leading to suspicion the bombers may be unwilling attackers and might be among hundreds of schoolgirls and young women kidnapped by Nigeria's home-grown Boko Haram Islamic extremist group in recent years.

The group's stronghold is in northeast Nigeria, where a suicide bomber on Monday killed 48 students and himself.