The gods decided that they would need the demons in order to help in the churning of the ocean of milk, which would bring forth these treasures. They offered them an equal share of the Amrita, though they could never afford to give the demons the strength provided by the Amrita, which would have made them even stronger than the gods.
The demons agreed to the proposal and first helped the gods to tear up the Mount Madura for use as a churning stick. The serpent Vasuki was brought from his underwater abode to be used as a churning rope. Trough a trick of Vishnu, the gods took the tail end and the demons pulled from the head. As the churning progressed, Vasuki's breath grew very hot and the demons almost suffocated.
The precious things produced by the Churning of the OceanWhen the serpent Vasuki started to vomit a poison that threatened to contaminate the ocean of milk and the Amrita, Shiva took it in his mouth, where it turned his throath blue.
As the churning progressed, the Mount Madura began to sink into the ocean bed. Thereupon, Vishnu assumed the form of his turtoise avatar Koorma, dived to the bottom and let them use his back as a pivot upon which the churning stick could turn.
The Ocean produced Lakshmi, Sura, goddess of wine, Chandra or the Moon, Rambha the nymph, Uchchaisravas the white horse, Kaustubha a jewel, Parijata the celestial wishing tree, Surabhi the cow of plenty, Airavata a white elephant, Sankha a conch shell, Dhanus a mighty bow and Visha the poison vomited by Vasuki.
And at last the Ocean also produced the Amrit, carried by Dhanwantari. Both gods and demons immediately tried to seize it but the demons were first. While they were quarreling over who should drink it first, Vishnu assumed the form of Mohini, a beautiful woman, and through sleight of hand, she gave the demons varuni, or liquor, while the gods got the amrit.
The demons, however, caught on to the deception and grabbed the amrit kumbh or pot of elixir. During the quarrel, some drops of the elixir fell on the earth, that later became the precious gem mines.
Jayant, the son of Indra, removed the pot from the quarreling gods and demons and ran away with it. He rested at four places in India, where he set down the pitcher, drank a little, and let a few drops of nectar spill to the ground. Where these drops landed became the four sacred sites of the Kumb Mela.
Another version has it that Garuda, the sacred mount of Vishnu, spilled the amrit four times at the four places where the Kumb Mela festival is now held. His journey took 12 days, equalling 12 years for mortals.