Samyukta Āgama (2) 28
Māra Saṃyutta Māra transforms himself into a snake to frighten the Buddha
Thus have I heard, once, the Buddha was staying near Rājagaha on Gijjhakūṭa Mountain.
At that time, in the middle of the night, the World-honored One was practicing walking meditation in the open. Having washed his feet, he entered his silent abode, sat upright and focused his attention in front of him. Then, King Māra the Bad had this thought: “The renunciant Gotama staying in Rājagaha on Gijjhakūṭa Mountain is practicing walking meditation in the open. I should go and disturb him.”
At that time King Māra changed into a huge snake that was long and thick like a large boat. With a pair of eyes glittering brightly like a bronze bowl from the land of Kosala, tongue flicking in and out like lightning and breath heaving like thunder, it stood before the Buddha and coiled its body around him. Then, it bent its neck forward, and lowered its head on to the head of the Buddha. The Buddha, who knew that this was Māra trying to disturb him, spoke this verse:
“I live in complete solitude / the mind focused in true liberation, in quiet meditation and physical cultivation / according to the teaching of the former Buddhas.
Poisonous snakes, fierce and violent / of terrifying appearance, constrictor snakes and vermin: / all these disturbances / cannot stir even one hair on my body / much less frighten me.
If the sky broke apart / or the great earth shook, all beings / would feel great terror; but to frighten me / is not possible.
Even if you aimed a poisoned arrow / at my heart, the moment the arrow struck / I would not seek protection; nevertheless the poisoned arrow / cannot penetrate.”
When King Māra heard the Buddha speak this verse he thought: “The Gotama renunciant knows my mind!” and he became deeply afraid. Depressed and dispirited, he made himself invisible and returned to his heavenly palace.