Once Panadavas and Kouravas, the two royal families fought with each other. Finally the Pandava princes won the battle (Mahabharatha) and attained their Kingdom.
Dharmaraja, the eldest among them, was worried that they killed in the war all their relatives, elders and even acharyas. He asked Sri Krishna, "O Lord Vasudeva! For the simple reason of winning back my kingdom. I had to kill all my relatives in the war. This sin is the most direst. Can you guide me to redeem this by any means"?
Sri Krishna Said, "There is a hill known as Venkata. By bathing in a particular lake your sins will be washed away".
Dharamaraja came to the hills with his four brothers and wife and to the particular lake to redeem their sins. Later the thirtham was known as Pandava Thirtham. Dharmaraja ruled his Kingdom happily for several years.