An onmyōji (yin-yang master) and Court Astronomer of the mid-Heian period. He served in the Bureau of Onmyō (Onmyōryō) and was esteemed by the court as the preeminent onmyōji of his age, versed in astronomy, astrology, and ritual magic. Initiated into the secrets of onmyōdō by his masters Kamo Tadayuki and his son Yasunori, he opened his own distinctive path in the way of astronomy. Trusted by Emperor Ichijō, he took sole charge of court divination, purification rituals, and prayers. In 1004, near the end of his life, he was said to have received a residence from Emperor Ichijō, which became the forerunner of Seimei Shrine. He died at 84. Legends of his supernatural power and prophetic ability circulated during his lifetime, and after death he was widely venerated as "Seimei-san." In modern times, his legend has spread further through Yumemakura Baku's novel series Onmyōji and its film and manga adaptations, making him internationally recognized as Japan's representative "sorcerer" figure.