He answered:
If a Muslim enters a territory at war with the Muslims without a guarantee of safe-conduct, purchases their children from them, and brings them into the territory of Islam, they become his property by agreement of the imams. He may sell them to Muslims, who may purchase them from him, and he is entitled to receive the full price from the purchaser. Likewise, if a non-Muslim of that belligerent territory sells himself to the Muslim, who then brings him out, he becomes his property with even greater reason. Indeed, even if they gave him their children without payment and he brought them out, he would own them; how much more so if they sold them to him. The same applies if he abducted them or their children, or subdued them by any means. For the persons and property of disbelievers at war with the Muslims are lawful for Muslims to seize; when they take possession of them by a lawful means, they acquire ownership of them.
The scholars differed only concerning someone who had entered under a guarantee of safe-conduct: may he purchase their children from them? There are two opinions within the schools of Abū Hanīfa and Mālik. According to one report from Ahmad, purchasing from them is permissible. Indeed, Abū Hanīfa and Ahmad—in an explicitly recorded report from him—held that if the Muslims conclude a truce with the inhabitants of a town, and someone takes those inhabitants captive and sells them to the Muslims, it is permissible to purchase them from him. Mālik and al-Shāfi'ī disagreed with him on this in the other report. Likewise, if the people of a belligerent territory subjugate one another, or give one another away as gifts