Story of Lord Dattatreya
The story of Dattatreya is told in many Puranas. The story from Markandeya purana, chapter 15, is as follows:
A brahmin named Kaushika was enchanted by a courtesan and lost his wealth, health etc. However, his wife, Shandili was faithful to him. She even carried him on her shoulders to the courtesans place. Once, by mistake, she stepped on Sage Mandavya and the sage cursed both of them to die by sunrise. Shandili prayed and appealed that the sun may never rise so that her husband would live. Her prayer was answered and the devas were in an uproar seeing the world order of time destroyed. They asked for the help of Anusuya, the wife of sage Atri, to convince Shandili. Anusuya was able to convince Shandili on the condition that Kaushika would live on sunrise. In appreciation of Anusuyas intervention, the gods granted her three boons. She asked for her liberation, her husbands liberation and that the three gods Brahma, Vishnu and Shiva be born as sons to her. The wishes being granted, from Sage Atris eyes issued a light and served as the seed for the divine sons Soma, Durvasa, and Datta partial incarnations of Brahma, Shiva and Vishnu, respectively.