A female suicide bomber has killed at least eight people when she detonated an explosive device in a mosque in northeastern Nigeria.

The attack took place at 5:30 am (0430 GMT) in the London Ciki area of Maiduguri, capital of the restive Borno state and birthplace of the Boko Haram terror group.

"She killed eight people and injured 15 others. The mosque was being guarded by civilian JTF (joint task force militia) during prayers," Ahmed Satomi, the head of the Borno state emergency management agency, told AFP.

Some local media reported that the death toll stood at ten.

"Unknown to them, the girl was being pursued from another part of town by residents who were suspicious of her movement at the time. When she approached the mosque, they demanded that she stop to be searched but she suddenly bolted into the mosque and set off her bombs," Satomi continued.

He added that three other female suicide bombers were located in Maiduguri at about the same time.

Although no-one has claimed responsibility for the mosque attack, suspicion is likely to fall on Boko Haram, renowned for kidnapping women and children and forcing them to carry out suicide bombing missions in the country.

This is the latest attack to occur in recent weeks in Maiduguri and the second time that four female suicide bombers have tried to carry out attacks in the town in a week.

At least 19 people were killed and 23 others injured when four female suicide bombers blew themselves up in the Molai Kolemari area of the city.

Earlier in July, Boko Haram claimed responsiblity for the ambush of a 200-vehicle convoy after fighting with security forces on a highway connecting Maiduguri to Damboa town. During the ambush, Boko Haram kidnapped some policewomen the group said were going to be militants' slaves.

Nigeria up close: Check out our Flipboard magazine

Who are Boko Haram militants?

Boko Haram fights against Western influence in Nigeria and aims to impose its version of Sharia law throughout occupied territories. In 2016, the group officially allied with Isis.

The UN says at least 20,000 people have died in Nigeria and neighbouring states since the Boko Haram insurgency became violent in 2009. The conflict has also displaced at least 2.1 million people.

The group used to control total territory the size of Belgium. However, Nigeria's ongoing military operation, Lafiya Dole, and a regional offensive – consisting of 8,700 troops from Nigeria, Niger, Chad, Cameroon and Benin – have scored some successes, with soldiers recapturing key territories and releasing thousands of civilians held captive by the group.

Last year, the army claimed it had stormed Boko Haram's last known stronghold in Sambisa Forest, which the group denied.

Earlier this year, a Boko Haram faction released 82 girls who had been held captive since April 2014. The release was the result of negotiations that involved several actors, including the Swiss government.

The release suggested there could be further collaboration between the government and the group, now split in at least two factions, after Isis replaced Abubakar Shekau as leader with Abu Musab al-Barnawi, a former Boko Haram spokesperson.

The country's government and army have often claimed the fight against the insurgents is over, but violence has continued since.

Nigeria attacks
Emergency services, police and residents gather at the scene of a suicide bomb attack on a market in Maiduguri AFP/ Getty Images