Islamic extremists killed 35 people and kidnapped at least 185 in an attack near the town where nearly 300 schoolgirls were taken hostage in April, witnesses said Thursday.

In Sunday night's attack on the village of Gumburi, most of the kidnapped were young women, children and members of a civilian defence group fighting Boko Haram, according to residents, a security official and a local government officer.

Teenager Aji Ibrahim said he was lucky to escape into the bushes.

"No doubt they were Boko Haram members because they were chanting 'Allahu akbar' (God is great) while shooting at people and torching houses," he told The Associated Press.

News of the attack took days to emerge because the militants have destroyed communications towers and people walked for days to avoid areas under extremist control.

Gumburi is 20 kilometres from Chibok, the northeastern town where extremists kidnapped 276 schoolgirls in April. Dozens of the students escaped that attack, but 219 remain missing.

Thousands have been killed

The militants have kidnapped hundreds of people, but the mass kidnappings of the girls from a boarding school attracted international outrage and condemnation of Nigerian President Goodluck Jonathan and his military for their failure to rescue the hostages.

The United States, Britain, France and China were among countries that sent security experts and hostage negotiators to help free the girls. Washington also flew drones over the area where it believed the schoolgirls were held. None of them has yet been found.

Boko Haram leader Abubakar Shekau initially demanded the release of his fighters who are being held illegally without charges or trial. But Jonathan said he would not negotiate with terrorists.

There were reports that some of the girls had been married to their captors and some carried across borders.

In a recent video, Shekau said the girls were "an old story," implying their release was no longer up for negotiation.

A series of attacks by young female suicide bombers in recent months has raised fears that Boko Haram is using kidnapped girls.

Boko Haram has seized a score of towns and villages in Nigeria where it has declared an Islamic caliphate along the northeast border with Cameroon.

Last month the insurgents seized Chibok and held it for two days until they were ousted by Nigerian troops.

Thousands of people have been killed in the 5-year-old Islamic uprising that has driven some 1.3 million from their homes.