DESCRIPTION:
At the time of the Buddha, Āṭavaka was a man-eating yakṣa that lived deep in the forest of ĀṭavI. One day, the king of Āṭavī was hunting in the forest. On his way back to the palace, he passed under a large banyan tree where Āṭavaka dwelt. The yakṣa was granted permission by King Vaiśravaṇa that he could seize and devour anyone who came within the shadow of his abode. In exchange for his life, the king, along with his ministers and the mayor Nagaraguttika, made a promise to provide the demon with the bodies of captured criminals as food.
Of Āṭavaka's many powers, one was that a glance at him could make one's body as soft as butter. It eventually came to pass that due to a shortage of criminals, each household in the vicinity was forced to sacrifice one child to satiate the demon. Pregnant women fled the capital until twelve years later, the only child left was the king's own son Āṭavaka Kumāra. The king dressed his son for the occasion of sacrifice. The Buddha, using his power of clairvoyance, saw the potential outcome of the situation and hastened to the yakṣa's lair.
Confrontation
While Āṭavaka was away with an assembly of yakṣas in the Himalayas, the Buddha was greeted by his doorkeeper Gadrabha. Gadrabha warned the Buddha of the demon's wrathful nature, but the Buddha fearlessly entered Āṭavaka's abode and sat upon his throne.
Gadrabha traveled to the Himalayas to inform Āṭavaka what had happened. Meanwhile, the Buddha was teaching Dharma to Āṭavaka's womenfolk. The yakṣas Śatagiri and Haimavata were also on their way to the assembly in the Himalayas and became aware of the Buddha's presence by their inability to fly directly over him. They flew down to venerate the Buddha before continuing on their journey.
When Āṭavaka heard from Gadrabha, Śatagiri and Haimavata of the Buddha's presence, he placed his left foot on Manosilātala and his right foot on Kelāsakūta, both localities in the Himalayas, which suggests that the yakṣa grew to an enormous size. He cried out his name aloud and hurried back to his palace. Despite his various supernormal powers, he was unsuccessful as dislodging the Buddha from his throne. Even his ultimate weapon; the cloth Dussāvudha, one of the four most powerful weapons in the world; was of no effect. When he hurled it, it simply fell at the Buddha's feet as a rug.
Āṭavaka's Questions
Āṭavaka finally asked the Buddha to leave. The Buddha complied. The demon then summoned him to return, which the Buddha did. To and fro the Buddha went at Āṭavaka's command until the fourth time, when the Buddha refused to obey.
Āṭavaka's proposed a set of questions to the Buddha, claiming that if he was unable to answer, he would possess his mind, rip out his heart, or hurl him by the feet across the Ganges river. Although there are a total of thirteen questions, they are usually grouped together as eight. In question and answer format.
Conversion
After his questions were answered, the yakṣa, amazed at the Buddha's wisdom and righteousness, became a śrotāpanna. The Commentary (SnA.i.228) states that Āṭavaka's parents had prepared these questions and their answers from Kāśyapa Buddha and taught them to their son. He had them written on a gold leaf with red paint to be stored in his palace. The answers the Buddha gave were identical to those given by Kāśyapa Buddha.
At dawn, the king's men arrived with the young prince prepared for sacrifice as food for Āṭavaka. They hear the yakṣa shout with joy upon hearing the Buddha's teachings. When they offered the boy to the demon who in turn handed him over to the Buddha. The Buddha blessed the boy and handed him back to the king's men. This boy was then known as Hastaka Āṭavaka, who became one of the foremost lay disciples of the Buddha.
Upon learning of the demon's conversion, the king and the citizens of Āṭavī built for him a special residence near that of Vaiśravaṇa, where they provided him with gifts of flowers, scents, and more.
Mahāyāna
The Mahāyāna tradition recognizes Āṭavaka as a Wisdom King and one of the Eight Great Yakṣa Generals of Vaiśravaṇa. A common title is Āṭavaka Mahāyakṣasenāpati (“Great Yakṣa General Āṭavaka”).
In East Asia, he is commonly known as 大元帥明王 Japanese: Daigensui Myōō, though many other names and translations exist.
Images of Āṭavaka vary, but he is commonly depicted with one head and four arms, four heads and eight arms, six heads and eight arms, eighteen heads and thirty six arms, etc. He is often blue, black or red in color and wields a sword, vajra, and other items.
Daigensui Myōō is venerated as a protector of the nation from foreign enemies as well as natural disasters. In ancient times, the Japanese Imperial Court held a ceremony from the eighth to fourteenth days of the first month called Taigen[sui] no hō (大元帥の法; lit. Law of Āṭavaka) to ward off calamities.