One progressive way of reading the history of the world is as a story of the successive enlargement of our sympathies. We start as completely tribal beings, for whom the destruction of the neighbouring tribe is a pure blessing. There is no suggestion that God, or whatever spiritual entities preceded the idea of God, has any objection to the elimination of rivals. Whether you look at the evidence from archaeology, from anthropology, or even from the Old Testament, humanity is not one but many, and most of the many humanities are useful only as slaves or (archaeologically) as food.
The gods of the ancient world were explicitly gods amongst others. Even Yahweh, the best attested precursor of monotheism, was one god among many. When he leads his people out of Israel to the Promised Land, this is very bad news indeed for the Canaanites, and the awful fate of the dispossessed is taken as an unarguable testimony to the superiority of the Israelite God over others, and his goodness to his chosen people, not to humanity at large. I think it’s arguable that humanity itself is a relatively modern conception. All the early words that mean something like ‘humanity’, such as ‘allemanni’, (which really does seem to mean ‘all men’) refer to particular bounded sections of humanity, in that case, Germans – if they were male and free. The others are something less than properly human.
The first crack in this tribal conception of humanity comes with the idea of conversion. At first that is something much more like adoption: in the Old Testament, as in Rome, to change gods was to change family as well. The story of the book of Ruth is often cited by Christian preachers as an example of conversion but to read it is to realise that it is essentially the story of an Israelite man claiming a piece of lost property – the widowed daughter-in-law of a relative of his. Nonetheless, this shows that the bounds of ‘humanity’ were not fixed. You could be born into one station in the world and move into another without violence. This really isn’t a self-evident development: the caste system seems to have survived for millennia in India on the explicit denial that any such thing was possible, and various forms of race-based slavery have proved pretty robust as well. But Greek elites could move among cities, and in the Roman Empire the identity of Roman citizen took precedence over all others, and became eventually open to every taxpayer.