Sage Durvasa was a great ascetic. Once he was walking along holding in his hand a special garland of flowers called Santanaka. Indra (Devendra), the King of Devatas, while riding on his elephant Airavata came across the sage who was coming from the opposite direction. Indra accepted the garland but put in on the trunk of the elephant. The elephant was irritated by the smell and it threw the garland on the floor. Durvasa lost his temper and cursed: "The pride of wealth has entered your head. Let Lakshmi forsake you." Then Indra realized his folly. He bowed to Durvasa and sought his pardon. Durvasa said, "Sri Vishnu will do you good," and left.
On account of Durvasa's curse, Lakshmi left Indra and went away. Because Lakshmi the goddess of power, bravery, enthusiasm and radiance left, Devendra's life became miserable. The demons that were waiting for such an opportunity invaded heaven. In battles that followed this incident, Devas were defeated and Asuras (demons) led by king Bali, gained control of the universe. Indra lost his kingdom and hid out of sight of the demons.
A number of years passed. Indra's teacher Brihaspati thought of finding a way out for Indra's troubles. He went with the gods to Brahma, who went to Vishnu with all of them and put forth the appeal of the gods. Then Vishnu said to him don't fear, I will show you a way out. The sea of milk must be churned (Samudra Manthan or Sagar Manthan). It is a very difficult job. Therefore, gain the friendship of the demons and get their assistance. Lord Vishnu advised him to treat Asuras in a diplomatic manner. Devas formed an alliance with Asuras to jointly churn the ocean for the nectar of immortality (Ambrosia or Amrit) and to share it among them. However, Lord Vishnu told Devas that he would arrange that they alone obtain the nectar.
To churn the ocean you will need a churning tool and a churning rope. Use Mount Mandaranchal as a churning tool (dasher) and Vasuki, the king of the serpents, as a churning rope. I will come to your assistance at the proper time. When the sea is churned Ambrosia (Amrit) will be produced. Let the gods drink it and become immortal. They will then attain superb strength. It will then be possible for you to defeat the demons. When the sea is churned, Lakshmi who has disappeared will appear again. Her grace will be bestowed on you. He consoled the gods and arranged for the churning of the sea.
The story of Lakshmi's birth begins when the Devas (minor gods) were in a race against the Asuras (demons) to obtain amrit (the nectar of immorality). At one time both the Devas and Asuras were mortal (mrita). Brihaspati was very clever. He met the demons, managed cleverly to bring about friendship between them and the gods and arranged to make them churn the milky sea. The demons agreed in the hope of getting ambrosia and wealth. They all gathered, carried the Mandara Mountain and dipped it in the sea of milk. They tied Vasuki, the king of snakes, as a rope. The gods held the tail of the snake, while the demons (Asuras) held its head, and they pulled on it alternately causing the mountain to rotate, which in turn churned the ocean. However, once the mountain was placed on the ocean, it began to sink.
Vishnu in his second incarnation, as "Kurma" the tortoise (Boar), and brought the Mountain to the surface, which was at the bottom of the sea. Mandara was placed on the back of the Kurma and was balanced and floating. In the grip of Kurma's cosmic clutch, the mountain could not sink into the ocean bed. They started to churn by threading the serpent Vasuki around Mount Mandara.
The gods churned and received the Nectar of Immortality from Lakshmi Devi and then fourteen treasures came to their hands. A host of divine celestial objects came up during the churning. Among these, importantly, was Goddess Lakshmi, the daughter of the king of the milky ocean. Vishnu carried Lakshmi from the ocean into His heaven. Each time Vishnu descends on earth as an avatar. He is accompanied by an avatar of Lakshmi. The last to come up was "amritam", the "nectar of immortality".
All kinds of herbs were cast into the ocean and fourteen Ratnas (gems or treasures) were produced from the ocean and were divided between asuras and gods. These were:
While churning, first Kalakuta or Halahala a dreadful poison came out of the ocean. Everybody was frightened by its fierceness. This terrified the gods and demons because the poison was so toxic that it might have destroyed all of creation. On the advice of Vishnu, gods approached Shiva for help and protection. On request of the gods, Shiva was pleased to drink that poison. The black colour of the poison left a mark on Shiva's neck. Therefore Shiva was named 'god with a black spot on the neck'. In otherworlds Lord Shiva got another name; ie - Neelakantha.
Gods and demons continued churning the sea. Then a horse by name Uchaishravas, Kalpavriksha having the power to grant what is wished, Kamadhenu and other celestial articles took shape. When the sea continued to be churned the Apsaras damsels were born.
After that a surprising spectacle appeared. In the midst of the waves of the sea of milk, a goddess with heavenly looks came into view. She was standing on a fully blossomed lotus. Wearing a lotus garland in the neck, she was holding a lotus in her hand. Her appearance was most attractive. She, who was radiantly smiling, was Lakshmidevi herself. The sages began reciting hymns in praise of her. Gandharvas sang Apsaras danced. The elephants on either side sprinkled sacred holy Ganga water on the Goddess and bathed her. Because the elephants sprinkled holy water on her, she acquired the name of Gaja Lakshmi. As Lakshmi was born in Ksheer Samudra the sea of milk she got the name Samudratanaya (Daughter of the Sea). The king of the sea appeared in his natural form and comforted Lakshmi as a daughter. He presented her with attractive clothes and jewels. He handed to her a garland of lotus flowers. While everybody was looking in surprise, Lakshmi put the garland around the neck of Vishnu and occupied his chest. Lakshmi chose Vishnu as Her Consort. When she looked at Indra kindly, he acquired an extraordinary radiance.
Finally, Dhanvantari emerged from the sea. Dhanvantrai is the doctor of gods. She had a sacred pot in his hand. There was ambrosia in it. Fierce fighting ensued between Devas and Asuras for the nectar. To protect the nectar from Asuras, Devas hid the pot of nectar at four places on the earth - Prayag (Allahabad), Haridwar, Ujjain and Nasik. At each of these places, a drop of the nectar spilled from the pot and it is believed that these places acquired mystical power. A Kumbh Mela is celebrated at the four places every twelve years for this reason.
However, the Asuras eventually got hold of the nectar and started celebrating. Frightened, Devas (demigods) appealed to Vishnu, who then appeared disguised as Mohini. As she was beautiful, the demons looked at her in surprise. Mohini came near them and said: "Do not quarrel for ambrosia. If you agree, I will myself serve ambrosia. You sit in two rows." All agreed. The demons sat in one row and the gods in another. As a beautiful and enchanting damsel, Mohini distracted the Asuras, took the amrita, and distributed it among the Devas, who drank it. By sleight- of- hand Mohini served intoxicating drinks to the demons and amrita to the gods. The demons who were enamored of her charm did not notice the trick played on them. The One Asura, Rahu, disguised himself as a Deva and drank some nectar. Due to their luminous nature, the sun god Surya and the moon god Chandra noticed the switching of sides. They informed Mohini. But before the nectar could pass his throat, Mohini cut off his head with her divine discus, the Sudarshana Chakra. The head, due to its contact with the amrita, remained immortal. To gain revenge on the sun and moon for exposing this, the immortal head occasionally swallows the sun or the moon, causing eclipses. Then, the sun or moon passes through the opening at the neck, ending the eclipse. Gods drank ambrosia and became immortal. They became free from fear of death. The demons came to know afterwards that they had been deceived. They started a war. The gods who had gained strength by consuming ambrosia defeated the demons and drove them away. The moon also appeared from the ocean during the churning, the 'moon' (chandra) making it her brother. Alakshmi, the goddess of misfortune, is Lakshmi's elder sister. According to the Vishnu Purana, Lakshmi is the daughter of Bhrigu and Khyaati and resided in Swarga but due to the curse of Durvasa, she left Swarga and made Ksheer Sagar her home.