In 2013, thousands of young men formed a rag-tag militia and rounded up Boko Haram members in Maiduguri, northeast Nigeria, then handed them over to the military.
The Civilian Joint Task Force (CJTF), as it later became known, was instrumental in driving the Islamist militants out of the strategic city.
Since then, the ranks of the “vigilantes” have swollen to about 20,000 across the remote region.
Armed with home-made muskets, swords, axes, slingshots and bows and arrows, they man security checkpoints and even accompany the military on operations against the jihadists.
“If it wasn’t for the CJTF (Maiduguri) would have long fallen into the hands of Boko Haram,” said Saad Abubakar, a community leader in the Borno state capital.
“They are a fearless band of committed young men who know Boko Haram members and the terrain very well,” he told AFP.
But with a relative calm returning to the northeast as a result of a sustained counter-insurgency, one question is increasingly being asked: what to do with the vigilantes?
Some have already been implicated in allegations of human rights abuses and there are fears that with no alternative employment, some could turn to a life of crime.
“What next after the war is our concern,” said the Borno state coordinator of the CJTF, Abba Aji Kalli.
“Some vigilantes may decide to become criminals. The government should think twice before it’s too late.”
The CJTF is largely made up of uneducated and unemployed young men, who receive no regular wage and are instead reliant on hand-outs from sympathetic locals.
Many lost their jobs in farming, herding, fishing and trading as a result of the conflict, which has left at least 20,000 dead and displaced more than 2.6 million others since 2009.
Umar Usman, 32, used to be a food spices trader and was one of 700 vigilantes trained in weapons handling.
He said he has no other way of earning a living and agreed that crime could be a way out for some.
“Going by the current trend we are heading towards a repeat of the Bakassi Boys scenario,” he suggested.
The Bakassi Boys were a militia in Nigeria’s oil-rich south, who were formed to fight armed robbery and other crime in 1998.
Politicians used them as violent enforcers during the 2003 elections but they turned to crime, including oil theft and kidnapping for ransom, when they were disbanded.
In Maiduguri itself, the ECOMOG, which took its name from the West African peace-keeping mission during the Liberian civil war, was a similar gang for hire.
They were used during the 2007 elections to intimidate political opponents and allow electoral fraud through threats and violence.
When they were let go, it is thought some joined Boko Haram.
“With money at the disposal of desperate politicians, it is very easy for the poverty-stricken and hungry vigilantes to compromise,” said Abubakar.
The military has made efforts to reign in the vigilantes, organising them into groups or sectors with central and unit commands, and given them basic security training.
Many young men have been given a sense of purpose through volunteering, not to mention a degree of authority, in a region blighted by poverty and unemployment.
Vigilante Modu Grema, however, said lax recruitment procedures has raised fears that criminals — and even Boko Haram members — may already have infiltrated their ranks.
In February, the head of the CJTF, Lawan Jaafar, was arrested on suspicion of links to the militants. Two local politicians are also in custody for alleged complicity with Boko Haram.
Grema said the influx of new members has compromised the structure and led to indiscipline, but Kalli maintained “appropriate sanctions” were given to offenders.
“We never take the law into our own hands,” he said, citing the case of one vigilante who was convicted and sentenced to death in January last year for killing a civilian.
Borno state governor Kashim Shettima has acknowledged the potential security threat from the CJTF.
Some 1,700 vigilantes have been recruited into a youth empowerment scheme since 2013, which gives them a guaranteed monthly stipend of 15,000 naira.
The authorities want to recruit 1,000 more as firefighters and 500 as road traffic personnel, while a further 500 have joined the army and 30 the intelligence agency.
Kalli, however, said more was needed to secure the future, while Umar had a stark warning if the current situation continued.
“The government is unwittingly grooming another monster that will haunt it after Boko Haram is defeated,” he said.
Join GhanaStar.com to receive daily email alerts of breaking news in Ghana. GhanaStar.com is your source for all Ghana News. Get the latest Ghana news, breaking news, sports, politics, entertainment and more about Ghana, Africa and beyond.