In one of his wandering he came to across Ajeegartha, son of sage Survayas. Ajeegartha was also called Ruchika. Therewas a famine and Ruchika and his family members were suffering for lack of food. He had three sons namely ShunapuccaShunashefa and Shunolangoola. The poor sage was leading a miserable life.
Rohita went to Ruchika and fell at his feet and said,"O revered sage, you are in great misery you need help and I amalso in need of help. My father is going to perform a sacrificial Yajna and he needs a young man. You have three sons.If you are ready to offer one to be given in sacrifise to Lord Varuna, I will give you a thousand well fed cows." ThoughAjeegartha promised to give away his first son. His wife loved the youngest son very much and she refused to partwith him. Shunashefa, the second son heard his parents and realised that he was unwanted by both his parents. He toldthe prince that he was reaady to go with him.
According to the agreement Rohita gave Ruchika one thousand cows and got Shunashefa. Shunashefa fell at the feet of hisparents and his elder brother and received their blessings. He embraced his father. The parents had to say good byewith tears in their eyes. They were very sad. No parents would sell their grown up son.!
Harishchandra made all preparations to perform Rajasuya Yaga. Varuna also agreed to take Shunashefa in the place ofRohita. Harishchandra was very happy and was ready for the great Yaga.
River Sarayu flowed near Ayodhya, his capital. The holy platform for the Yagna was ready on the banks of the sacred river.
Sage Viswamitra was made the hotr sage Jamadagni was appointed adhwaryu and sage Agasya became Udgatr. The preceptorof the Surya Vamsha adorned the position of brahma.
Rohita came along with Shunashefa unable to bear the pain of seperation Shunashefa's father Ajeegartha also accompaniedhis son.
Shunashefa was tied to a post. Time for his sacrifice and to be given as havis approached.
Viswamitra was watching the deliberations closely. Suddenly he realised that Shunashefa was the son of his own sisterSatyavathi. When he saw that Shunashefa was going to die for no fault of his, Viswamitra's heart went out for his nephewand he was very much pained. He determined to save him. Suddenly he stood up and said,"Shunashefa ma bhaishi, do notget frightened, I am giving the full lease of life and at the same time the Yagna is also going to be taken to itsritualistic conclusion" So saying he addressed the following words to Lord Varuna,"Imam me Varuna Shrudhi", meaning"Hei Varuna listen to my request" He initiated shunashefa into a hymn praising Varunadeva. When shunashefa chantedthe hymn, to everyone's pleasant surprise, Varunadeva came to the Yajnashala in person. Instantly all the ropes that tied Shunashefa snapped and the boy's life was saved.
Shunashefa rushed to Viswamitra and fell at his feet seeking his blessings. He was in tears of joy and the tearswashed Viswamitra feet as if the boy was doing padapooja to the great sage.
"As a result of the grace of Varunadeva I received you, Shunashefa. You will hereafter be well known as Devarathaand I accept you as my eldest son", announced Viswamitra in that holy assembly. The news of Viswamitra's greatness,Varuna's arrival and saving of Shunashefa spread in all the three worlds.
Viswamitra went to his ashram along with Devaratha. The sage addressed his one hundered sons on reaching the ashramthus,"My dear sons, this boy Devaratha is a great person. Hereafter he is going to be elder to you all".
But the elder fifty sons including Andharka did not relish the idea of Devaratha being considered elder to them.Andhraka stood up and said, "Devaratha becoming elder to us has no meaning. This is injsutice and I don't agree to it",and behaved in an irate manner. But of the other fifty the first son Mudhuchanda welcomed his father's suggestion.This made Andhraka and the other fortynine mad with anger. They behaved very badly and Viswamitra in great angercursed them saying,"You have behaved badly, be you bad throughout your lives."
The other fifty along with Subashefa remained good and became great scholars and led a righeous life.Viswamitra who brought Shunashefa to life was invited to swarga by Varuna. Viswamitra travelled to swarga and as a result he grewproud.