The story goes that when Cybele, one of Zeus' would-be sex partners, rejected him, Zeus wouldn't take "no" for an answer. While his victim slept, the great philanderer spilled his seed on her. (This divine method of procreation was also used to produce Athenians parented by Hephaestus and the virgin goddess Athena. See Children of Athena.) In due course, Cybele gave birth to Agdistis, a hermaphroditic demon so strong and wild the other gods feared him. In their terror they cut off his male sexual organ. From its blood sprang an almond tree. (This castration/birth connection is also seen in one version of the story of the birth of Aphrodite.)
The river Sangarius had a daughter named Nana who ate the fruit of this almond tree. When, as a result of her snack, Nana delivered a boy child 9 months later, Nana exposed the child. (This was an ancient method of dealing with unwanted children that usually led to death, but did not in the case of such important figures as Romulus and Remus, Paris, and Oedipus, as well as Attis.) But infant death was not to be his fate. Instead, reared by the proverbial area shepherds, the boy soon became healthy and handsome -- so handsome his grandmother Cybele fell in love with him.
The boy, whose name was Attis, was unaware of the love Cybele bore him, but since she was a goddess, Attis' opinion didn't count for much. In time, Attis saw the king of Pessinus' beautiful daughter, fell in love, and wished to marry her. The goddess Cybele became insanely jealous and drove Attis mad for revenge. Running crazy through the mountains, Attis stopped at the foot of a pine tree. There Attis astrated and killed himself. From Attis' blood sprang the first violets. The tree took care of Attis' spirit. Attis' flesh would have decayed had not Zeus stepped in to assist Cybele in the resurrection of Attis.
Since then, a yearly ritual has been performed to purify the body of the dead Attis. The priests -- referred to as Galli or Gallae -- are emasculated in emulation of Attis. A pine tree is chopped down, covered with violets and carried to the shrine of Cybele on Mt. Dindymus. There Attis is mourned for 3 days. Then, when Cybele brings him back to life, there is a wild and joyful celebration.