Gripping a machete he claimed was stained with blood, a 24-year-old civilian manned a checkpoint in one of Nigeria's most dangerous cities, looking for members of a violent Islamist group.

Vigilante groups have emerged with the encouragement of the military in the northeastern city of Maiduguri, the original home base of Boko Haram Islamists, and their arrival has been both welcomed and fraught with potential trouble.

The city has been devastated by insurgent attacks and military raids that are estimated to have claimed hundreds of civilian lives.

An unregulated, untrained and crudely armed civilian force may prove to be the last thing the city's imperilled residents need. Civilian gangs have in the past served as political enforcers around the country.

In early July, an example of the risks occurred when vigilantes burned a politician's home in Maiduguri, accusing him of links to Boko Haram.

But some have voiced support for the new Maiduguri militia, including the military, which has described the vigilantes as a useful new tool in the battle against Boko Haram.

"We have cleansed the city of Boko Haram vampires," said Abubakar Mallam, head of the so-called "Civilian JTF," a name that nods to the military's Joint Task Force (JTF).

The vigilantes' claims that all Boko Haram members have been chased from Maiduguri is likely an exaggeration.

Boko Haram, which says it wants to create an Islamic state in northern Nigeria, was founded in Maiduguri more than a decade ago and its fighters have been embedded among the population.

However, a military offensive launched in May and the formation of the vigilante groups have coincided with a decline in attacks within the city and in Islamist strongholds across the northeast.

The violence has by no means ended though, particularly in more remote areas of the region.

At least three schools have been attacked in northeastern Nigeria by suspected Boko Haram members, and at the weekend, a vigilante raid and reprisal attack by Boko Haram members left at least 20 people dead in the village of Dawashe.

Members of the Civilian JTF said their month-old campaign has yielded results because they have a key advantage over the regular security forces.

"We know them. They lived among us," Dauda Bukar, a vigilante in the Umarari area of Maiduguri, told AFP.

Aside from machetes, the civilian guardsmen were seen carrying axes, clubs and bows and arrows while patrolling the streets of the dusty city, where the desert climate often brings an unbearable afternoon heat.

They have claimed raids on houses where alleged Boko Haram members live, arresting insurgents before handing them over to the military.

Members have also claimed to have carried out summary executions.

-- Anything for peace --

Vigilante leaders say the force was formed following a gruesome June 11 attack by presumed Boko Haram members in Maiduguri's Hausari neighbourhood.

The Islamists arrived disguised as a funeral procession. They stopped, opened the coffin, pulled out kalashnikovs and began firing indiscriminately on civilians, killing 15 people.

Military officials said they were trying to both document and train the militia and were even seeking to coordinate operations.

"We support, we commend and we appreciate the efforts of the... Civilian JTF," military spokesman in Maiduguri Lieutenant Colonel Sagir Musa told AFP.

A state government official who requested anonymity acknowledged that a vigilante group in a conflict-scarred city would invariably "commit some rights violations", but that so far its emergence had been positive.

"The Civilian JTF may bark and hurl abusive language at people (but) Boko Haram shoot, bomb and slaughter their victims," the official said.

He also insisted that the ruling party in Borno state, of which Maiduguri is the capital, has deliberately avoided collaborating with the force to guard against accusations that the fighters have a political agenda.

Maiduguri residents have for months been caught between waves of brutal Boko Haram attacks and the heavy-handed tactics used by the military.

The insurgents' alleged crimes have included suicide blasts, gun raids and abductions, while the military has been accused of arbitrary killings, razing homes and torture.

There is evidence that both sides have committed crimes against humanity, according to Human Rights Watch, which has estimated that 3,600 people have died in the conflict since 2009.

Most of the northeast, including Maiduguri, has been under a state of emergency since May 14 while the military has pursued a campaign against the Islamists.

One community leader said anything, even an illegal civilian militia, was welcomed if it helped restore peace.

"For now, we have to bear with them," said Husseini Hala, who heads Maiduguri's lawyers union. "Compared to what the insurgents are doing, their own (abuses) are insignificant."