Yamabushi (山伏?) (one who lies in the mountains) are Japanese mountain ascetic hermits with a long tradition, endowed with supernatural powers in traditional Japanese mysticism. They follow the Shugendō (修験道) doctrine, an integration of mainly esoteric Buddhism of the Shingon (真言) sect, with Tendai (天台宗, Tendai-shū) Buddhism, Taoism, and Shinto (神道) elements. For the most part solitary, they did form loose confederations, and associations with certain temples, and also participated in battles and skirmishes alongside samurai (武士) and sōhei (僧兵) on occasion. Their origins can be traced back to the solitary Yama-bito（山人, Yamaōshi, and some hijiri (聖) of the eighth and ninth centuries. There has also been cross-teaching with samurai weaponry and Yamabushi's spiritual approach to life and fighting.
In modern use, the term ubasoku-yamabushi refers to laymen practitioners of shugendō. The religion places a heavy emphasis on asceticism and feats of endurance, and white and saffron-robed yamabushi toting a horagai conch-shell trumpet are still a common sight near the shugendō holy site of Dewa Sanzan and in the sacred mountains of Kumano and Omine.
Yamabushi began as yamahoshi, isolated clusters (or individuals) of mountain hermits, ascetics, and "holy men", who followed the path of shugendō, a search for spiritual, mystical, or supernatural powers gained through asceticism. This path may or may not have had a founder, as the myths surrounding En no Gyōja are numerous and complex; he is quite similar to a Japanese Merlin in this way. Men who followed this path came to be known by a variety of names, including kenja, kenza, and shugenja. These mountain mystics came to be renowned for their magical abilities and occult knowledge, and were sought out as healers or mediums, although Shinto shrines had traditionally reserved this role exclusively for maidens known as Miko.
Most of these ascetics, in addition to their devotion to shugendō, studied the teachings of the Tendai sect of Buddhism, or the Shingon sect, established by Kōbō Daishi in the 8th century. Shingon Buddhism was one of the primary sects of mikkyō (密教) or Esoteric Buddhism, according to which enlightenment is found through isolation, and the study and contemplation of oneself, as well as nature, and esoteric images called mandala. Both the Shingon sect and the Tendai viewed mountains as the ideal place for this sort of isolation and contemplation of nature.
In their mountain retreats, these monks studied not only nature and religious/spiritual texts and images, but also a variety of martial arts. Whether they felt they had to defend themselves from bandits, other monks, or samurai armies is questionable, but the idea of studying martial arts as a means to improve oneself mentally and spiritually, not just physically, has always been central to Japanese culture, beyond the specific tenets of one religious sect or another. Thus, like the sōhei, the yamabushi became warriors as well as monks.
As their reputation for mystical insight and knowledge grew, and their organization grew tighter, many of the masters of the ascetic disciplines began to be appointed to high spiritual positions in the court hierarchy. Monks and temples began to gain political influence. By the Nanboku-chō Period, in the 13th and 14th centuries, the yamabushi had formed organized cohorts called konsha, and these konsha, along with sōhei and other monks began to take direction from the central temples of their sects. They assisted Emperor Go-Daigo in his attempts to overthrow the Kamakura shogunate, and proved their warrior skills to be up to the challenge of fighting professional samurai armies.
Several centuries later, in the Sengoku Period, yamabushi could be found among the advisers and armies of nearly every major contender for dominion over Japan. Some, led by Takeda Shingen, aided Oda Nobunaga against Uesugi Kenshin in 1568, while others, including the abbot Sessai Choro, advised Tokugawa Ieyasu. Many fought alongside their fellow monks, the Ikkō-ikki, against Nobunaga, who eventually crushed them and put an end to the time of the warrior monks.