17.8 People Who Do Not Know
Although the polytheists tortured and killed Muslims whenever they fell into their hands, disregarding completely their rights as individuals and their relationship to them as kin, the Koran commanded the Muslims to protect and treat well the polytheists they captured for they were people who did not yet understand. Very often they opposed the words of Allah without knowing what they were opposing. So they should be allowed to hear the words of Allah, then put where they felt secure. If, after returning to their people when there was no pressure upon them, they declared themselves to be Muslims, they should be accepted as such.

On this the holy verses say:

Should any of the polytheists ask your protection,
give it to him, so that he may hear the words of Allah,
then deliver him to where he feels safe.
This is because they are people who do not know.

There were many who came to jeer and sneer, and remained to worship; there were many who came suspiciously to test and try, and then bowed in reverence. There were those who came as captives, then returned Muslims to spread the word of Allah among their people.