Onmyōdō

Onmyōdō (陰陽道) is a technique that uses knowledge of astronomy and calendars to divine good fortune in terms of date, time, direction and general personnel affairs, originating from the philosophy of the yin-yang and the five elements.

The philosophy of yin and yang and was introduced to Japan at the beginning of the 6th century, and, influenced by Taoism, Buddhism, and Confucianism, evolved into the earliest system of  around the late 7th century. In 701, the Taiho Code established the departments and posts of who practiced  in the Imperial Court, and  was institutionalized. From around the 9th century during the Heian period, interacted with Shinto and Goryō worship (御霊信仰) in Japan, and developed into a system unique to Japan. Abe no Seimei, who was active during Heian period, is the most famous ( practitioner) in Japanese history and has appeared in various Japanese literature in later years. was under the control of the imperial government, and later its courtiers, the Tsuchimikado family, until the middle of the 19th century, at which point it became prohibited as superstition.

Development
In the 5th and 6th centuries, the principles of yin-yang and the Five Elements were transmitted to Japan from China and Baekje along with Buddhism and Confucianism, particularly by the obscure Korean monk Gwalleuk. Yin-yang and the Five Elements, as well as the divisions of learning to which they were linked – astronomy, calendar-making, the reckoning of time, divination, and studies based on observation of nature – were amalgamated into fortune telling. This process of judging auspicious or harmful signs present in the natural world, was accepted into Japanese society as a technique for predicting good or bad fortune in the human world. Such techniques were known mostly by Buddhist monks and physicians from mainland Asia, who were knowledgeable in reading and writing Chinese. Over time, demand from members of the Imperial Court who believed that divination would be helpful in decision-making, made it necessary for the laity to perform the art, and  began to appear around the middle of the 7th century. Under the Taiho Code enacted in the early 8th century, the departments of the Imperial Court to which belonged were defined by law.

From around the 9th century during the Heian period, interacted with Shinto and  worship in Japan, and developed into a system unique to Japan. Until then, emphasized divination for policy decisions by high government officials, but since the Heian period,  has emphasized magic and religious services such as warding off evil for preventing natural disasters and epidemics and for the productiveness of grain, as well as curses against opponents. Because Shinto places importance on purity, Shinto priests were required to perform (ritual purification) and fast before performing these religious services, so their activities were restricted. On the other hand, since did not have to perform   or fast, they were able to deal with  (uncleanliness) more easily, and they expanded their activities beyond the support of Shinto priests. It gradually spread from the Imperial Court to the general public. In the 10th century Kamo no Tadayuki (賀茂 忠行) and his son Kamo no Yasunori (賀茂 保典), made great advancements in, astronomy and calendar science. From among their students emerged Abe no Seimei (安倍清明), who displayed superior skills in the divining arts of, by which he gained an uncommon amount of trust from the court society. Tadayuki and Yasunori passed on their skills in astronomy to Seimei while their advances in calendar-making went to Yasunori's son. From the end of the Heian period into the Middle Ages, astronomy and calendar science were completely subsumed into, and the Abe and Kamo families came to dominate the art in the Imperial Court.

Onmyōji (陰陽師) was one of the classifications of civil servants belonging to the Yin-Yang Bureau in ancient Japan's system. People with this title were professional practitioners of.

were specialists in magic and divination. Their court responsibilities ranged from tasks such as keeping track of the calendar, to mystical duties such as divination and protection of the capital from evil spirits. They could divine auspicious or harmful influences in the earth, and were instrumental in the moving of capitals. It is said that an could also summon and control. During the Heian period the nobility organized their lives around practices recommended by. The practice of "lucky and unlucky directions" provides an example. Depending on the season, time of day, and other circumstances, a particular direction might be bad luck for an individual. If one's house was located in that direction, such an individual was advised not to go back directly to his house but had to "change direction", by going in a different direction and lodging there. Such a person would not dare to go in the forbidden direction, but stayed where they were, even if that resulted in absence from the court, or passing up invitations from influential people.

Famous include Kamo no Yasunori and Abe no Seimei (921–1005). After Seimei's death, the Emperor Ichijō had a shrine erected at his home in Kyoto.

had political clout during the Heian period, but in later times when the imperial court fell into decline, their state patronage was lost completely. In modern-day Japan, are defined as a type of priest, and although there are many who claim to be mediums and spiritualists, the  continues to be a hallmark occult figure.

Later history
Onmyōdō was officially abolished in 1870 by the, but it was permitted again after the propagation of religious freedom and the abolition of State Shinto in 1945. A new organization for Tensha Tsuchimikado Shinto (天社土御門神道), considered the modern form of Onmyōdō, was established in 1954. , the head was Yoshihito Fujita.