Greece invented the concept of barbaros. Imperial Rome inherited it as barbarus.
The original meaning of barbaros is rooted in language: an onomatopoeia meaning “unintelligible speech” as people go “bar bar bar” when they talk.
Homer does not refer to barbaros, but to barbarophonos (“of unintelligible speech”), as in those who don’t speak Greek or speak very badly. Comic poet Aristophanes suggested that Gorgias was a barbarian because he spoke with a strong Sicilian dialect.
Barbaru meant “foreigner” in Babylonian-Sumerian. Those of us who studied Latin in school remember balbutio (stammer, stutter, babble).