The Seventh Canto of Srimad-Bhagavatam relates the history of Lord Nrsimhadeva. He appeared many millions of years ago to protect His devotee Prahlada by killing Hiranyakasipu, Prahlada's demoniac, atheistic father, who was trying to kill Prahlada. After Hiranyakisapu's death, Prahlada offered Lord Nrsimhadeva many prayers filled with important instructions for everyone. Here is one of those prayers:
"O great one, O Supreme Lord, because of combination with pleasing and displeasing circumstances and because of separation from them, one is placed in the most regrettable position, with heavenly or hellish planets, as if burning in a fire of lamentation. Although there are many remedies by which to get out of miserable life, any such remedies in the material world are more miserable than the miseries themselves. Therefore I think that the only remedy is to engage in Your service. Kindly instruct me in such service." (Srimad-Bhagavatam 7.9.17)