The gods and the demons fought with each other all the time. Brihaspati was the preceptor of the gods and Shukracharya was the preceptor of the demons. Shukracharya knew a wonderful art known as mritasanjivani. This was the knowledge of bringing back dead people to life.
Since Shukracharya knew this art, the gods were in a terrible fix. Any demons whom the gods killed were promptly brought back to life by Shukracharya. But Brihaspati knew no such art. So any gods that the demons killed, stayed dead. The gods pondered about this problem and finally arrived at a solution. Brihaspati had a son named Kacha. The gods told Kacha. ―Go and become Shukracharya‘s disciple. Try to learn the art of mritasanjivani from him. Shukracharya has a beautiful daughter named Devayani. Try to curry her favour so that your task may become easier.‖
Kacha went to Shukracharya. ―Please accept me as your disciple,‖ he said. ―I am the great Brihaspati‘s son. I will serve you faithfully for a thousand years.‖ Since no mention was made of mritasanjivani. Shukracharya gladly agreed to ths proposition. Kacha lived with Shukracharya and served his guru (teacher). He became friendly with Devayani and Devayani started to fall in love with Kacha. Five hundred years passed. The demons got to know that Kacha was Brihaspati‘s son. Since they hated Brihaspati, they hated Kacha as well. Kacha was in the habit of taking Shukracharya‘s cattle to the forest to graze. When Kacha was alone in the forest, the demons seized their chance. They slew Kacha and fed his body to the tigers. In the evening, the cattle returned home alone. Kacha was not with them.
Seeing this, Devayani told her father, ―The cattle have returned home without Kacha. I am certain that someone has killed him. I am in love with Kacha and cannot survive without him. Please do something.‖ ―Do not worry,‖ Shukracharya told Devayani. ―I will bring Kacha back to life with the art of mritasanijivani.‖ As soon as Shukracharya recited the magical mantra (incantation), Kacha appeared before them, hale and hearty. Days passed. Kacha went to the forest once more, this time to pluckflowers. The demons killed him again. But this time they burnt the dead body and mixed the ashes in a goblet of wine. They then served the wine to Shukracharya to drink. When Kacha did not return, Devayani again told her father. ―I am certain that someone has killed Kacha. I cannot survive without him. Please do something.‖
Through this powers, Shukracharya discovered what had happened. He told his daughter, ―We have a real problem on our hands. Kacha is inside my stomach. I can revive Kacha by summoning him through mritasanjivani. But in the process, he will have to tear asunder my body and I shall die. Tell me, beloved daughter, which do you want ? Either Kacha or your fatehr will live.‖ ―I refuse the choice.‖ replied Devayani. ―Both you and Kacha must live. I cannot survive
without either.‖ Shukracharya then decided that there was only one way out. He addressed Kacha, who was inside his stomach, and taught him the words of the mrtasanjivani mantra. He then recited the words himself and out came Kacha. Shukracharya‘s body was torn apart and the sage died.
But Kacha had learnt the words of the mantra. He now recited them to bring Shukracharya back to life. Kacha thus learnt what he had set out to achieve. After spending a thousand years with Shukracharya, he prepared to return to heaven. ―Where are you going?‖ asked Devayani. ―Do you not know that I am in love with you? Please marry me.‖ I am afraid that I cannot do that,‖ replied Kacha. ―You are my guru‘s daughter. Therefore, you are my superior just as my guru is my superior. I cannot marry you. Moreover, I have spent some time inside his body. And when I came out, it was as if a son had been born from him. You are therefore my sister. How can I possibly marry you?‖ Thus spurned. Devayani became very angry. ―You are playing with words,‖ she said. ―I curse you that although you have learnt the art of mritasanjivani, it will prove to be of no use to you.‖ ―You have needlessly cursed me,‖ retorted Kacha. ―I too curse you that no brahmana will ever marry you and that you will never get whatever it is that you wish for.‖