During the time of Dasharatha, the emperor of all the seven islands of the earth, Shani was about to distinguish Rohini Nakshatra from the fourth phase of Krittika Nakshatra. The astrologers shuddered at the mere thought of it, informed King Dasharatha about its ill-effects.
He told King Dasharatha that in the event of Shani hitting Rohini, there would be a severe famine on earth for twelve years due to Shakatbheda Yoga.
Vasistha ji told that Rohini is the constellation of Prajapati Brahma ji, how can the people remain happy if there is a difference between it? Even for Lord Brahma and Lord Indra, the difference of power is incurable.
When no one could tell the way to escape from this impending crisis, the most majestic king Dasharatha himself reached the constellation Loka with divine weapons and divine bow. Rohini page is 1.5 lakh yojan above the sun. After reaching there, Dasharatha requested Shani Dev not to discriminate, then Shani Dev did not listen. On this he performed the saharastra on his bow and agreed to fight with Shani Dev. Due to this Shani Dev got a little frightened and laughingly said that O king! Devas, demons, human beings, siddhas, vidyadhars, serpents, etc., come to my sight, but you are saved. I have never seen effort like you in anyone. I am satisfied with your brilliance and virility. O Raghuvansh Bhushan! Ask for a boon, whatever you want with your heart, I will definitely give it.
On this King Dasharatha said that O Shani Dev! If you are pleased with me, then give only one boon that as long as the river, the sea, the sun, the moon and the earth are there, you should not pierce Rohini. Also, never smoke famine for twelve years. I don't want anything else.
On this Shani Dev said 'Avamastu'. King Dasaratha, after getting a boon from Shani Dev, being pleased, meditating on Lord Ganesha and Mother Saraswati, praised Shani Dev with this hymn:
नमः कृष्णाय नीलाय शितिकण्ठनिभाय च।
नमः कालाग्निरूपाय कृतान्ताय च वै नमः।।
नमो निर्मांसदेहाय दीर्घश्मश्रुजटाय च।
नमो विशालनेत्राय शुष्कोदरभयाकृते।।
नमः पुष्कलगात्राय स्थूलरोम्णे च वै पुनः।।
नमो दीर्घाय शुष्काय कालदंष्ट्र नमोऽस्तुते।
नमस्ते कोटराक्षाय दुनिर्रीक्ष्याय वै नमः।।
नमो घोराय रौद्राय भीषणाय करालिने।।
नमस्ते सर्वभक्षाय बलीमुख नमोऽस्तुते।
सूर्यपुत्र नमस्तेऽस्तु भास्करेऽभयदाय च।।
अधोदृष्टे नमस्तेऽस्तु संवर्तक नमोऽस्तु ते।
नमो मन्दगते तुभ्यं निस्रिंशाय नमोऽस्तु ते।।
तपसा दग्धदेहाय नित्यं योगरताय च।
नमो नित्यं क्षुधार्ताय अतृप्ताय च वै नमः।।
ज्ञानचक्षुर्नमस्तेऽस्तु कश्यपात्मजसूनवे।
तुष्टो ददासि वै राज्यं रुष्टो हरसि तत्क्षणात्।।
देवासुरमनुष्याश्च सिद्धविद्याधरोरगाः।
त्वया विलोकिताः सर्वे नाशं यान्ति समूलतः।।
प्रसादं कुरु मे देव वरार्होऽहमुपागतः।।
Pleased with the praise given by King Dasharatha to this hymn, Shani Dev said, 'Rajan! I am very happy with this hymn of yours. So I will give you one more boon, ask what do you ask?
On this King Dasharatha said that God! If you want to give a boon, then give it that from today onwards you will not give pain to any creature like gods, demons, humans, animals, birds and serpents.
Shanidev said to King Dasharatha, "Rajan! If I stay in the place of death (eighth), place of birth (ascendant) or fourth place of any deity, asura, man, Siddha, Vidyadhar etc., then I give him death like pain, but those who become holy worship my iron idol with Shamipatras. If he donates mixed urad-rice, iron, black cow or black bull to a brahmin and worships me with this hymn as you say on Saturday, then he will have no hindrance. Along with this, I will always protect him by removing the pain of other planets in his birth, transit, Mahadasha or Antardasha.
Thus King Dasharatha pleased Shani Dev and paved the way for all beings to escape from the cruel eyes of Shani Dev and get his grace.