Two female bombers killed at least 22 worshippers in an attack on a mosque on Wednesday, Nigerian rescue officials say.

The attack took place on the outskirts of the northeastern city of Maiduguri - the birthplace of the Boko Haram armed group.

Abdul Mohammed, of the State Emergency Management Agency, told The Associated Press news agency that another 17 people were wounded in the explosions early on Wednesday.

Abba Aji, coordinator of the civilian self-defence Vigilante Group, said that one bomber blew herself up inside the mosque and the second outside as survivors tried to flee.

Aji said the mosque is in Umarari on the outskirts of the city that is now the command centre of the Nigerian military's war against Boko Haram.

While there was no immediate claim of responsibility, blame will probably fall on the insurgents.

Boko Haram has increasingly used suicide and bomb attacks as Nigeria's military pushes the group out of territories they once controlled. Several bombers have blown themselves up in recent months at roadblocks into the city manned by the military and vigilantes.

The US military calls Boko Haram the most violent armed group in the world.

Some 20,000 people have been killed and about 2.3 million displaced since it started its violent campaign in 2009.

Children have been particularly targeted by Boko Haram and have often been the victims of sexual abuse, forced marriage, and abductions.