A hundred villagers in northwest Nigeria were freed on Tuesday after a 42-day hostage ordeal and assurances to the abductors that they would not face charges, police and other sources said.
Heavily-armed gangs known locally as bandits have long plagued northwest and central Nigeria by looting, stealing cattle and abducting for ransom.
Armed kidnappings along highways and from homes and businesses now make almost daily news in Africa's most populous country.
Gunmen stormed the village of Manawa in Zamfara state on July 8, seizing 100 residents, including women and children, and taking them to a forest hideout, state police spokesman Mohammed Shehu said.
Hostages in Nigeria are typically released after a ransom payment, with those whose families fail to pay often killed.
But this release was "unconditional" and was secured "without giving any financial or material gain" to the gang, Shehu said in a statement.
A source familiar with the negotiations told AFP the bandits agreed to release the villagers after police and state authorities "assured them no action would be taken against them for the kidnap."
The released hostages were due to undergo medical checks before being reunited with their families, Shehu said.
Zamfara state officials have been negotiating for more than a year with local armed criminal groups, in an effort to get the gangs to give up their arms in return for amnesty.
In December 2020, Zamfara officials negotiated a release of 344 boys who were kidnapped from a school in neighbouring Katsina state.
Bandit gangs operate from camps in the vast Rugu forest, which sprawls across the states of Zamfara, Katsina, Kaduna and Niger.
More than 8,000 people are estimated to have died as a result of violence in the region, according to a May 2020 report by the International Crisis Group (ICG) think tank.
Nigeria's air force has in the past attacked bandit camps while some northern states have sought to negotiate with the gangs by offering amnesties in return for disarmament.
But both military deployment and attempted peace deals have failed to end the violence.
On Monday 13 policemen were killed in Zamfara when they were ambushed by a gang as they deployed to protect a village from imminent attack.
The criminals have recently focused on attacking schools and kidnapping students to extort ransom money from parents.
Mass school abductions have soared this year, with almost 1,000 students kidnapped, according to UNICEF.
Most have been released after negotiations but many are still being held in forest hideouts, and none of the abductors has been arrested or prosecuted.
President Muhammadu Buhari, a former army general first elected in 2015, is under mounting pressure from allies and critics alike over his handling of Nigeria's security problems.
The northeast of the country has been ravaged by a 12-year militant insurgency that has claimed more than 40,000 lives and displaced two million people from their homes.