During the ancient time there lived a famous sage named Gautami. The name of his wife was Ahilya. Once it did not rain for one hundred years as the result of which the whole area was affected by drought.
Sage Gautami did a tremendous penance to please Varuna appeared before Gautam, he was requested to cause rain. But Varuna expressed his inability in causing rain. He told Gautam to please lord Shiva so that his wish could be fulfilled. Later on Varuna instructed Gautam to dig a up a pit, which he (Varuna) filled with water. Varuna blessed Gautam by saying that this pond would never dry up. The sages who had abandoned that place returned there. Everybody became happy and satisfied.
One day, sage Gautam instructed his disciples to fetch some water from that pond. When the disciples reached there, they found the wives of numerous sages present at the bank of the pond. The sages’ wives did not allow them to take water and instead they rebuked them. The disciples returned back to the hermitage and narrated the whole story to sage Gautam.
Ahilya pacified the angry disciples and went to the pond to fetch water. From that day onwards this became very daily routine. One day Ahilya met the wives of the sages. They tried to prevent her from fetching water. Not only that they went back to his respective hermitages and filled the ears of their husbands. All the sages became very angry.
The sages worshipped lord Ganesha to please him. When Ganesha appeared, they requested him to drive Gautam out from that place. At first Ganesha was reluctant to accept their demand but when they kept a persisting he agreed at last.
Ganesha entered the field of Gautam in which barley was being cultivated. Ganesha had disguised himself as a cow. He started grazing the barley crops.
When Gautam saw the cow grazing crops, he tried to drive her out from the field by hitting a grass on her back. The artificial cow died instantly. Gautam was very sorry for his act. Meanwhile all the sages from the surrounding area arrived there. They forced Gautam to abandon that place at once.
Gautam left that place and made his hermitage at a little distance from there. One day he came to the sages and asked them as to how could he atone for his sins. The sages told him that his sins could be atoned only when he circumambulates the whole earth thrice, all the while saying, ‘I have killed a cow’. They also told him that after that he would have to perform austerities for one month.
If this is not possible then you will have to help Ganga manifest herself and take bath in her water. Otherwise you will have to worship three crores Parthiva lingas. Only then, you can get liberated from the sin of killing a cow,” said the sages.
Gautam made the Parthiva lingas and started worshipping them. Lord Shiva became very pleased by his devotion and appeared before him. Sage Gautam requested lord Shiva to liberate him from the sins of killing a cow. He also requested lord Shiva to manifest the stream of river Ganga that place.
Lord Shiva tried his best to make him understand that he was innocent and the real culprits that he was innocent and the real culprits were those wicked sages. But, Gautam was unconvinced. At last lord Shiva instructed Ganga to appear in the form of a woman. Gautam eulogized Ganga. By the blessings of lord Shiva Gautam was liberated from his sins of killing a cow. After that Ganga expressed her desire to go back but lord Shiva asked her to remain on the earth till the twenty- eighth nanvantar. Ganga accepted to do that, on the condition that Lord Shiva along with Parvati too would remain present on the earth. Lord Shiva established himself as Trayambakeshwar Jyotirlinga and Ganga became famous as Gautami Ganga.