Hotoro, Nigeria (CNN) -- Residents of three villages in northeastern Nigeria took security into their own hands this week, repelling attacks by Boko Haram insurgents and killing more than 200 of them, residents and officials said.
Hundreds of Boko Haram fighters stormed the villages of Menari, Tsangayari and Garawa in the ethnic Shuwa-dominated Kalabalge District on Tuesday. Boko Haram -- the group responsible for the kidnapping of nearly 300 schoolgirls from the same region -- was met with stiff resistance as locals put up a fierce fight, witnesses said.
A month has passed since the girls were kidnapped, and the Nigerian government has been accused of not acting swiftly or efficiently enough to protect villages in the region threatened by Boko Haram.
In the three villages attacked Tuesday, gunmen arrived in dozens of all-terrain vans, armored tanks and motorcycles, but villagers quickly mobilized and engaged the attackers in a prolonged battle.
"They attacked Menari and killed around 60 people and burned some homes before proceeding to Tsangayari and Garawa villages," resident Algoni Ahunna said.
When news of the attack filtered out, people trooped out from nearby villages carrying arms.
Locals seized an armored tank, three all-terrain vans and 90 motorcycles from the attackers, residents said.
"At Tsangayari and Garawa they met a big surprise as residents engaged them in a fierce battle in which over 200 of the Boko Haram fighters were killed. More than 150 were killed in Tsangayari," Ahunna said.
A lawmaker in Borno state's Parliament confirmed the incident.
"I received information on the gallant action taken by the people in Kalabalge District in which at least 200 Boko Haram gunmen were killed," said the lawmaker, who asked not to be named for security reasons.
A relief worker in the area said he counted more than 100 bodies in Tsangayari alone.
"I believe the number of the gunmen killed is up to 250," said the worker, who also asked not to be named for fear of reprisals from Boko Haram.
It was the second defeat Boko Haram has suffered from locals in the area in over a month.
Scores of Boko Haram gunmen were killed by villagers in early April in a foiled raid, residents said.
The director general of the National Orientation Agency, which acts as a communications arm of the government, commended the villagers' actions, but defended the military.
"The vigilante is a common phenomenon in Nigeria -- it is not a new development," Mike Omeri said. "They were able to do what they did because they had prior information that these people were coming to attack them at a particular time in the night and particular time of the day."
Omeri said he did not know how the villagers would have received that key information.
"The military cannot be in every village at the same time -- like I said for emphasis, if the military had not been on the ground sufficiently, perhaps the entire northeast would have been overrun by now. Or the entire country would have been overrun," he said.
Meanwhile, the military was having problems among its ranks after 20 soldiers were killed in two separate ambushes on Wednesday. One of those ambushes happened after troops left Chibok, the village from which the girls were kidnapped.
According to military sources, Nigerian soldiers upset over the deaths of their colleagues opened fire on a convoy carrying a military commander. The commander escaped unhurt, the military sources said.
"Soldiers have been angry with the poor treatment they receive from their superiors in terms of inadequate arms and poor allowances in their combat against Boko Haram," a military source said. "The death of their colleagues was too much for them to bear."
The Nigerian defense spokesman, Maj. Gen. Chris Olukolade, downplayed the incident as "an internal issue that has been sorted out."