Islam, which, as Muhammad ibn Nasr reported from him, was the later of his two positions. He used to say that when the children of those at war with the Muslims were taken captive without their parents, they were Muslims; if they were with both parents, they followed their parents’ religion. If they were taken captive with one parent, two positions are reported from him. He cited the hadith as evidence.
[Abū Bakr al-Khallāl’s discussion in his Compendium]
Abū Bakr al-Khallāl said in his Compendium, in the Book of Rulings Concerning Religious Communities:
“Abū Bakr al-Marwazī informed us that Abū ‘Abd Allāh said concerning captives taken from those at war with the Muslims: ‘They are Muslims if they are young, even if they are with one parent.’
He used to cite as evidence the words of the Messenger of Allah (may Allah bless him and grant him peace):
‘His parents make him a Jew or a Christian.’ …
He said: ‘As for the people of the frontier, they say that if he is with both parents, they compel him to embrace Islam.’”
He said:
“We do not hold this view. The Prophet (may Allah bless him and grant him peace) said:
‘His parents make him a Jew.’