Near Mount Agdos in Phrygia, the myth relates, Zeus spilled seed on the earth while sleeping, and from the ground itself a being was born who was both male and female, called Agdistis, wild and immensely powerful. Fearing what this being might do, the other gods resolved to weaken it. Dionysus tricked Agdistis into drinking at a spring until sleep overcame it, then tied its male organ by a cord to a nearby tree; waking and springing up, Agdistis was castrated by its own violent movement. From the blood, or from the severed organ itself depending on the telling, grew an almond tree, or in some versions a pomegranate.
Nana, a daughter of the river Sangarius, picked a fruit from that tree and placed it in her lap, and became pregnant by it though no man had touched her; her father, disbelieving her, exposed the resulting child, who was rescued and raised as Attis, and grew into a beautiful young man. Agdistis, now castrated into female form and effectively the Mother goddess herself in most tellings, fell in love with Attis. When Attis was about to be married to a princess, Agdistis appeared at the wedding feast and drove him into a frenzy; Attis fled to the mountains, castrated himself under a pine tree, and bled to death, or in another strand of the tradition was killed by a wild boar. Violets are said to have sprung from his blood, and the pine became, ever after, sacred to his cult.