Shilavati was married to Urgrashravas, who fell ill with leprosy. Since she was a woman who did everything for her husband, one night she carried him on her back to a prostitute. She overlooked a sage, her husband struck him with his foot and he cursed him to die at sunrise.
Shilavati asked the sun not to rise again. Life on earth came to a standstill. The wise asked Anasuya for help. She went to Shilavati and promised her that if she took the curse back, she would bring her dead husband back to life. Shilavati agreed, the sun rose, Ugrashravas died, Anasuya brought him back to life.
Brahma, Vishnu and Shiva then granted Anasuya a favor. She asked the three to be born as her son. The son was Dattatreya.