Chess originated almost 2000 years ago in India. It became known in the 6th century as chaturaṅga, which means the four divisions of the army. The infantry (pawns), cavalry (knights), elephantry (bishops), and chariotry (rooks). In Sassanid Persia around 600 the name became chatrang and the rules were developed further, and players started calling "Shāh!" (Persian for "King!") when attacking the opponent's king, and "Shāh māt!" (Persian for "the king is finished") when the king was attacked and could not escape from attack; these exclamations persisted in chess as it traveled to other lands thereafter.
The game was taken up by the Muslim world after the Islamic conquest of Persia, with the pieces largely retaining their Persian names; in Arabic "māt" or "māta" مَاتَ means "died", "is dead". In Arabic, the game became shatranj.
The Moors of North Africa rendered "shatranj" as shaterej which gave rise to the Spanish acedrex, axedrez and ajedrez; in Portuguese it became xadrez, and in Greek zatrikion, but in the rest of Europe it was replaced by versions of the Persian shāh ("king"). Thus, the game came to be called şah in Romanian, šah in Slovene, Schach in German, schaken in Dutch, shakki in Finnish, szachy in Polish, scacchi in Italian, šahs in Latvian, skak in Danish, sjakk in Norwegian, schack in Swedish, escacs in Catalan, and échecs in French (Old French eschecs). Chess spread directly from the Middle East to Russia, where chess became known as шахматы (shakhmaty, treated as a plural).
Chess spread throughout the world and many variants of the game soon began taking shape. This game was introduced to the Near East from India and became a part of the princely or courtly education of Persian nobility. Buddhist pilgrims, Silk Road traders and others carried it to the Far East where it was transformed and assimilated into a game often played on the intersection of the lines of the board rather than within the squares. Chaturanga reached Europe through Persia, the Byzantine empire and the expanding Arabian empire. Muslims carried chess to North Africa, Sicily, and the Iberia by the 10th century.