Ancient Babylonian astrologers discovered that there were "wandering" luminaries in the sky called planets.
These bodies were believed to revolve around the Earth in this order: Moon, Mercury, Venus, Sun, Mars, Jupiter, and Saturn. Ancient Babylonian astrologers thought that each hour of the day was under the patronage of a particular planet.
For the convenience of calculations and time planning, ancient astronomers and astrologers invented the Star of the Magi, a kind of seven-pointed "calculator". In this star, the planets are arranged in a circle from the slowest, Saturn, to the fastest, the Moon.
The sequence of week days is calculated clockwise by the rays of the star.