 The Mahabharata narrates that Vashishtha meets Kalmashapada at the end of the 12-year period and frees the king of the curse. The king returns to his original form and accepts the sage as his guru and purohita (priest). Both of them return to Ayodhya. However, Kalmashapada is still heirless and cannot unite with his wife in coitus due to the Brahmin widow's curse. The king requests Vashishtha to inseminate Madayanti, following the practice of niyoga. The queen becomes pregnant by the sage but does not deliver for 12 years. Finally, the frustrated queen breaks her womb with a stone and her son is born. Since the son is born with the aid of a stone (Ashman), he is named Ashmaka ("the child born of a stone"). The Mahabharata adds that this act of "giving" his wife to a Brahmin helps Kalmashapada attain heaven.
