Told in the Valmiki Ramayana, King Bhagiratha's thousand-year penance brought the goddess Ganga down from heaven, her fall broken in Lord Shiva's matted hair, to free his ancestors' souls.