The gods and the demons always fought with one another. In the process, many demons and gods were killed. This was no problem for the demons. Their teacher, Shukracharya, knew the art of mritasanjivani and immediately brought the dead demons back to life. But the gods who were killed stayed dead. The gods went to Brahma for his advice. ―Having a temporaty truce with the demons,‖ said Brahma. ―Unite with them and churn the ocean. This churning will make you immortal and you will have no reason to fear the demons.‖ The gods went to meet Vali, the king of the demons, with the proposal and Vali agreed to the temporary truce. Preparations were made for the churning of the ocean. Mount Mandara was used as the rod for churning and the great snake Vasuki agreed to be the churning-rope. The problem however was the Mount Mandara had no base to rest on. And without a base, the peak would move and the churning could not proceed. The great Vishnu adopted the form of a huge turtle (kurma). The back of the turtle provided the base on which Mount Mandara could rest. The churning started. The gods held Vasuki‘s tail and the demons the head. The churning went on for a thousand years of the gods. The first object to emerge as a result of the churning was the moon, Chandra. Shiva accepted Chandra as an adornment for his forehead.
Lakshmi, the goddess of wealth and prosperity, merged next and was united with Vishnu, Sura, the goddess of wine and drinking, came out next. She was followed by the divine horse Uchchaishrava. This was appropriated by Indra. A beautiful jewel named koustubha came out next and was accepted by Vishnu as his adornment. After these wonderous objects had come out, smoke started to billow out and clouded the atmosphere. The cloud was followed by tongues of fire which threatened to burn up the gods and the demons. From the fire there came out all sorts of poisonous snakes and venomous insects. This was followed by a terrible poison known as
kalakuta. No one knew what to do with the poison, it would have killed them all. The gods and the demons began to pray to Shiva for deliverance. Shiva appeared and swallowed up the poison. It suck in his throat and made his throat blue in colour. Since nila means blue and kantha means throat, Shiva came to be known as Nilakantha.
With the danger removed, the churning continued and Dhanvantari came out of the ocean. He was the physician of the gods and the originator of medicine (ayurveda). Dhanvantari held the pot of amrita in his hands. The demons immediately started to fight over the possession of the amrita. But Vishnu adopted the form of a beautiful woman (known as mohini). This woman was so pretty that all the demons fell in love with her and gladly handed over the pot of amrita to her. But they continued to fight with the gods. While the fighting went on, Vishnu secretly fed the gods the amrita. The gods became immortal. The demons received no amrita, not a single drop. That was not quite true. There was a demon named Rahu. He adopted the form of a god and managed to get a little bit of the amrita. But Surya and Chandra spotted the deception and pointed it out to Vishnu. Vishnu promptly severed Rahu‘s head with his chakra. The amrita never percolated down beyond Rahu‘s throat. But the demon‘s head had had its share of the amrita and became immortal. Rahu never forgave Surya and Chandra for telling on him. Rahu‘s head tries to swallow up the sun and the moon, given a chance. You can see this happening at the time of the solar and lunar eclipses. This was the story of Vishnu‘s turtle incarnation.