[2][4] During the early stages of esoteric (Vajrayana) Buddhism, many of the deities that would become known as vidyārājas (a term that only came into use around the late 7th-early 8th century[5]) were mainly seen as attendants of bodhisattvas who were invoked for specific ends such as the removal of misfortune and obstacles to enlightenment.
[7] A belief prevalent in the Japanese tradition known as the sanrinjin (三輪身, "bodies of the three wheels") theory for instance posits that five Wisdom Kings are the fierce incarnations (教令輪身, kyōryōrin-shin, lit.
[13] Later, as Yamāntaka and similar subordinates of various bodhisattvas (e.g. Hayagrīva, who was associated with Avalokiteśvara) became fully independent deities, they began to be portrayed by themselves and increasingly acquired iconographic attributes specific to each.
Hayagrīva, for example, was originally the horse-headed incarnation of the Hindu god Vishnu which was adopted into Buddhism as Avalokiteśvara's attendant (although unlike the Hindu Hayagrīva, the Buddhist figure was never portrayed with a horse's head, instead being depicted like Yamāntaka as a yaksha who may have a miniature horse head emerging from his hair).
For instance, the Wisdom King Trailokyavijaya is shown defeating and trampling on the deva Maheśvara (one of the Buddhist analogues to Shiva) and his consort Umā (Pārvatī).
[30] A commentary on the Mahavairocana Tantra by the Tang monk Yi Xing meanwhile attributes the taming of Maheśvara to another vidyārāja, Acala.
[31] Acala himself is sometimes shown trampling on an elephant-headed demon/deity who may share a common origin with the Hindu Ganesha named Vighnarāja (the "Lord of Obstacles") in Tibetan art.
The acknowledged canonical source of the grouping of eight is the Mañjuśrī-mūla-kalpa, the Chinese translation of which (大方廣菩薩藏文殊舍利根本儀軌經; Dà fāngguǎng Púsà Zàng Wénshūshèlì Gēnběn Yíguǐ Jīng, lit.
The acknowledged canonical source of the grouping is from The Sutra of the Liturgy for Brilliant Contemplation of the Ten Wrathful Wisdom Kings of the Illusory Net of the Great Yoga Teachings (佛說幻化網大瑜伽教十忿怒明王大明觀想儀軌經; Fóshuō Huànhuàwǎng Dà yújiājiào Shífènnù Míngwáng Dàmíng Guānxiǎng Yíguǐ Jīng).