As per Vedic scriptures, King Sagara was a celebrated king of the Suryavansha dynasty in the Satya Age (Satya Yuga). Married to the princess of Vidarbha, and the other princess from the royal Sivi dynasty, the King was an ancestor to King Bhagiratha, King Dasharatha and Prince Rama (An incarnation of Lord Krishna)
Once upon a time, King Sagara with the help of qualified Brahmins performed a sacrifice called Ashwamedha Yajna where horses (Ashwa in Sanskrit), dear to any king, were to be sacrificed. This was in order to prove the King´s sovereignty. The King of Heaven Indra began to fret over the results of the sacrifice and he then stole the horses through his mystic powers.
Later, Indra left the stolen horses at the ashram of Sage Kapila who was mistaken by the King´s sons (60,000 in numbers) for the thief. As a result, they all prepared to attack the humble sage. Before they could commit this immoral act of killing a divine sage, Kapila cursed them and their bodies burned them all from inside. Sage Kapila returned the horse to Anshuman, grandson of King Sagara, and informed him that all the sons of the King could be freed from the curse if Goddess Ganga (Ganges) descended to Bhumi, Earth and purified them in her waters.
The King´s great-great-grandson, Bhagiratha performed a severe penance and pleased Goddess Ganga to descend into Mother Earth. However, the Goddess reminded him that Her incessant currents of water would devastate the earth and expressed a wish to have someone who could break the water flow. Bhagiratth began to pray to Lord Shiva to break the flow of water. Lord Shiva, pleased with his devotion, fulfilled his wish and took on Him the flow of water onto His head.
Later, all the sons of King Sagara returned to being alive and achieved their eternal posts in the heavens.