Boko Haram recruited three local gangs in northwest Nigeria to kidnap hundreds of schoolboys on its behalf, security and local sources said Wednesday.
The jihadist group has claimed responsibility for Friday's attack, which targeted a secondary school in the town of Kankara, in Katsina state.
But sources told AFP the operation was carried out on Boko Haram's orders by a notorious local gangster called Awwalun Daudawa.
The 43-year-old worked in collaboration with Idi Minorti and Dankarami, two other crime chiefs with strong local followings, they said.
Criminal gangs, known as bandits, have terrorised communities in northwest Nigeria for years, and experts had recently warned of attempts by jihadists to forge an alliance with them.
Daudawa "was an armed robber and a cattle rustler before he turned to gun-running, bringing in weapons from Libya, where he had received training, and selling them to bandits," said a security source.
"Over time, he forged an alliance with Boko Haram and became their gunrunner, taking weapons the group seizes from the Nigerian security forces in raids and ambushes and selling them to bandits for a cut."
The source added: "Awwalun Daudawa was spotted in the forest in the Kankara area where he recently relocated and there were reports that he was planning something but it was not clear what it was."
Another source with intimate knowledge of "bandit" activities in Katsina and Zamfara states said: "From available information, Awwalun Daudawa was ordered by Abubakar Shekau to kidnap the schoolboys and he enlisted the help of Idi Minorti and Dankarami."
"After the children were taken, they went across the border into Zamfara state and split them among different gangs 'for safe keeping'. And some of the gangs have been in touch with the authorities for the release of the boys."
The attack occurred hundreds of kilometres (miles) from Boko Haram's stronghold in northeast Nigeria, where it launched a brutal insurgency a decade ago.
The jihadists made a claim of responsibility in a four-minute audio, sent to AFP through the same channel as previous messages from the group.
"I am Abubakar Shekau and our brothers are behind the kidnapping in Katsina," said the voice in the recording, resembling that of the elusive Boko Haram leader.
- 'Contacts' -
Shekau was behind the 2014 abduction of 276 schoolgirls in Chibok that sparked global outrage, but another source said that the two incidents were not immediately comparable.
"There is an ongoing peace pact between bandits and (the) Zamfara state government which the bandits don't want to breach. They have been under intense pressure to release the boys," the source said.
"This situation makes the Kankara abduction different from that of Chibok schoolgirls who were directly in the custody of Boko Haram. This time, the bandits who are keeping the children hold the ace, not Shekau."
The governor of Katsina state, Aminu Bello Masari, said late Monday that the abductors "have made contacts with the government."
"Talks are ongoing to ensure their safety and return to their respective families," he said on Twitter.
The government has not immediately reacted to Boko Haram's claim or confirmed its authenticity, and the number of missing students remains unclear -- 320 or 333, according to two accounts by officials, while locals in Kankara put it at more than 500.