Bhagirath was a prince whose father did not have a peaceful death. He was told that unless he could put some holy water of the Ganges on his father’s ashes there would be no peace for the dead man. He prayed to Ganga and she said he could take the water in a sieve because his father had been so evil this was the best she would suggest. Since he could not take the water that far he had to invoke divine intervention. Then he did penance (tapasya) for ten years standing on one leg till Lord Vishnu appeared and told him to take Shiva’s help to placate Ganga because she was quite aggressive and could cause a deluge in the world. So he prayed for another ten years to Shiva who appeared and said he would help break the fall of Ganga if she agreed to come down. So he prayed for another five years to Ganga and told her Shiva would help in avoiding the deluge if she came down through his hair. She agreed although it took a bit of time because Shiva also had a score to settle with Ganga and made her disappear in his hair for some time. Bhagirath was desperate. He prayed to Shiva to release Ganga so that he could perform the final rites for his father. Because of his devotion and perseverance the Ganges was released and came out of Gau Mukh.