Here is a salient passage on this issue from a Shafi’i manual of Islamic law:
When an adult male is taken captive, the caliph considers the interests … (of Islam and the Muslims) and decides between the prisoner’s death, slavery, release without paying anything, or ransoming himself in exchange for money or for a Muslim captive held by the enemy. (Umdat al-Salik o9.14)
A revered Islamic jurist, Al-Mawardi, agrees with ‘Umdat al-Salik:
As for the captives, the amir has the choice of taking the most beneficial action of four possibilities: the first, to put them to death by cutting their necks; the second, to enslave them and apply the laws of slavery regarding their sale or manumission; the third, to ransom them in exchange for goods or prisoners; and fourth, to show favor to them and pardon them. (Al-Ahkam As-Sultaniyyah (The Laws of Islamic Governance), 4.5)
“Nigeria: 30 teenagers abducted in northeast,” AGI, October 26, 2014 (thanks to C. Cantoni):
(AGI) Maiduguri, Oct 26 – A large group of teenagers, as well as numerous 11-year-old girls, were kidnapped in Nigeria on Sunday, with Boko Haram the most likely culprit. “The insurgents grabbed young people, boys and girls, from our region”, said Alhaji Shettima Maina, the village elder of Mafa.
“They took all boys aged 13 plus, and all girls aged 11 or more. According to our information, 30 young people were abducted in the last two days”, he said. . .