King Bhagiratha wanted to bring the sacred river Ganga from the heavenly realm to the earth so that the souls of his ancestors could be freed. He undertook long and difficult austerities to seek divine help.
Ganga agreed to descend, but her waters were so powerful that the earth could have been overwhelmed by the force of her fall. Bhagiratha needed another form of help.
He prayed to Shiva. Shiva agreed to receive the descending river in his matted hair. When Ganga fell from the heavens, her force was caught and divided among Shiva's locks before the waters were allowed to flow gently toward the earth.
Bhagiratha then continued on his path, guiding the river toward the place where the remains of his ancestors were said to lie. Ganga's arrival became associated with purification, remembrance, and the completion of Bhagiratha's long effort.
The story is often remembered as an example of perseverance. Bhagiratha does not achieve his goal through one dramatic act. He continues his effort, recognizes when his own strength is insufficient, seeks help, and continues again.