In the Vedas, amrita was a characteristic or quality of a suitable offering in the fire sacrifices to the gods. Soma (the divine plant) had more amrita than other offerings. Later amrita (or amritam) was a substance produced by the Churning of the Milky Ocean (kshirabdhi-mathanam). There were different versions of this myth in the Mahabharata, the Ramayana, and the Puranas. According to one version the demons (asuras) had triumphed over the gods (devas), so the devas sought Lord Vishnu’s help. He told them about amrita and how it would bestow immortality on those who drank it. Because the devas were able to take all of the amrita with Vishnu’s help, they were able to prevail over the asuras.
In the Puranas there were many stories about the stealing of this ambrosia of immortality. But amrita was no longer the sole source of immortality. Immortality was given by Brahma as the result of great austerities (tapas), but this was only a provisional immortality—a guarantee of living as long as one’s allotted time. In many of the later myths it was the asuras who did the difficult austerities and gained immortality, which was only a kind of limited invincibility, in order to torment the gods.
Later mythology conflates amrita and soma as the drink of immortality.