The sixty thousand sons of King Sagara of the Ikshvaku line were burned to ashes by the anger of Sage Kapila. Ganga water was needed for their liberation, but the Ganga was in heaven.
Sagara’s descendants tried for many generations without success. Finally King Bhagirath left his kingdom and performed severe penance in the Himalayas.
According to the story, Brahma was pleased by his penance and promised to send the Ganga to earth. But the problem was that her flow was so powerful that the earth could not bear it.
Bhagirath then worshipped Lord Shiva. Shiva was pleased and held the Ganga in his matted locks. Then she came down to earth slowly, as a single stream.
Bhagirath walked ahead and the Ganga flowed behind him. For this reason the Ganga is also called Bhagirathi. The story says the sons of Sagara were liberated by her waters.