From Dridashva was descended a king named Trayaruni. Trayaruni was a righteous king and followed all the religious dictates. But Trayarun’s son Satyavrata was quite the opposite and refused to follow the righteous path. King Trayaruni’s chief priest was the great sage Vashishtha. Vashishtha advised the king that his evil son should be banished from the kingdom. Trayaruni accepted the sage’s advice. Consequently, Satyavrata started to live with outcasts (chandalas) outside the kingdom.
After some time, Trayaruni relinquished his kingship and went away to the forest. The kingdom had no king and degenerated into anarchy. The absence of a king is also frowned upon by the gods and for twelve years there was a terrible drought.
Vishvamitra was another great sage. While all this was going on, Vishvamitra was not present in the kingdom. He had gone away to perform tapasya on the shores of the ocean, having left his wife and children in a hermitage (ashrama) that was in the kingdom. But because there was such a long spell of drought, there was also famine in the kingdom. People started to starve. Vishvamitra’s wife decided to sell her son so that she might have some food to eat. She tied a rope round the son’s neck and took him to the market-place. There, she sold him in exchange for a thousand cows. Since a rope had been tied around the son’s neck (gala), he came to be known as Galava.
But Satyavrata discovered what terrible straits Vishvamitra’s family was in. He freed Galava and started to take care of Vishvamitra’s wife and children.
Satyavrata had not been terribly fond of Vashishtha. He blamed the sage for his banishment. When thee was famine everywhere, Satyavrata stole Vashishtha’s cow. He killed the cow and served the meat to Vishvamitra’s sons, apart from eating it himself.
Vashishtha was in a terrible rage when he got to know about this incident. He cursed Satyavrata.
“You have committed three sins (shanku),” Vashishtha told Satyavrata. “Firstly, you have angered your father Trayaruni. Secondly, you have stolen and killed a cow. Thirdly, you have eaten beef, a forbidden meat. Because of these three sins, you will henceforth be known as Trishanku and be eternally cursed.” (The word tri means three.)
Satyavrata had however taken care of Vishvamitra’s family when the sage was away on his meditation. After Vishvamitra returned, he was very happy to learn about what Trishanku had done and offered to grant him a boon. Trishanku desired the boon that he might be allowed to go to heaven in his own physical body. Thanks to Vishvamitra’s immense powers, even this virtually impossible task was accomplished. Trishanku became king in Trayaruni’s kingdom and Vishvamitra acted as his chief priest.