In the Ramayana, the young Rama hears the story of how Ganga (the river Goddess) who only flowed through the heavens was brought down to earth.
One of Rama’s ancestors King Sagara had lost sixty thousand of his sons to the wrath of a powerful sage called Kapila. The sage had been disturbed from his deep meditation and accused of theft by the sons of King Sagara. The sage opened his eyes in a rage, and the heat from his angry eyes turned the sixty thousand princes into a pile of ash. Moreover as things stood, their souls were for ever damned and they would never find their way to the heavens.
King Sagara was heart broken. He rushed to the sage’s hermitage and asked for forgiveness, and a way to save the souls of his many sons. The sage took pity on the king and told him that the only way the trapped souls could ascend to the heavens, was to immerse them in the holy river Ganga.
There was only one trouble with that. In those days the Ganga did not flow through earth, but only flowed through the heavens. King Sagara was too old to undertake the mission and all his sons were dead. Who would do the needed penance required to propitiate the Goddess Ganga and bring her down to earth?
A grandson called Bhagiratha was born in the house of king Sagara and he undertook the penance required to bring Ganga down to earth and release his father and uncles. He prayed and meditated and underwent hard penance for a thousand years so that Brahma was pleased with him and asked Ganga, his daughter to jump to earth and flow over the ashes of king Sagara’s sons and release their souls. The joyous and bountiful Ganga was willing, but she feared that the impact of her fall from heaven to earth, would cause great destruction to earth and she needed someone to break her fall and save the earth.
The only God who could help was the mighty Shiva. So Bhagiratha started another penance for Shiva. He was prepared to go on for another thousand years, but the kindly Shiva offered to help and sat on the top of the Himalayas to receive the Goddess in his matted hair. Ganga fell with great force, sure that mere hair would not be enough to stop her crash, but found that she lost her way in the twists and twirls of the Gods hair. After a long time, only after the endless meandering in Shiva’s coils had slowed Ganga down, did he release her from the prison of his matted hair.
The Ganga now followed Bhagiratha over the lands of Northern India, washed over the ashes of the sixty thousand sons of Sagara and flowed into the ocean. Thus the sons of Sagara were released from eternal damnation and Ganga started flowing across vast tracts of Northern India.