The major place of Shinto worship is the shrine called a jinja or miya, a simple, austere wooden structure. The most famous is probably the shrine of Amaterasu at Ise, built around the 3rd century and consisting of 16 shrines and other structures covering an expanse of land. Government-approved shrines alone number over 100,000. The kami are believed either to dwell there or to arrive when summoned by the proper rites. The shrine to the war god Hachiman in Kamakura, for instance, was a center of feverish worship in the late 13th century when Kublai Khan, the founder of the Mongol dynasty in China, twice attempted to invade Japan. After storms lashed his fleet and caused him to give up both times, the myth that Japan was protected by the gods was greatly enhanced. The unique Japanese form of drama called Noh, perfected by a Shinto priest and his son in the 14th-15th centuries, developed out of religious dances performed in front of such shrines.
Buddhism, arriving in the 6th century with its doctrines about the after-death worlds, succeeded in absorbing much of the ancestor and hero worship of Shinto. Kukai, the founder of the Shingon sect of Buddhism, preached that the Buddha reincarnates when and wherever necessary to help humanity (a variation on the Hindu avatar), and that the national gods and goddesses of Shinto were actually ancient incarnations of various buddhas and bodhisattvas. Beginning with the historical Buddha as the reincarnation of Amaterasu, Kukai taught that there was essentially no difference between worshiping Buddhist or Shinto figures. This came to be called Ryobu (“Two Faced”) Shinto, and allowed the common folk to consider themselves at once Buddhists and Shintoists.
But Buddhism also brought to Japan literature, medicine, the arts and sciences, and a deeper sense of compassion and tolerance, along with improvements in skilled occupations from canal- and bridge-building to weaving and brewing. Buddhist monks served much the same function as did Christian monks during the Dark Ages of Europe (with whom they were roughly contemporaneous), preserving learning while improving living conditions.