Sage Mrikandu prayed to Shiva for a son. Shiva appeared before him and asked, "Do you want an ordinary son or a perfect son who would not live more than sixteen years?"
Mrikandu thought, "If I ask for a perfect son, he would die at sixteen, but if I ask for an ordinary son, he would not be great." He chose a perfect son.
Soon his wife gave birth to a son whom they called Markendeya. He was a handsome, wise, and kind boy, perfect in every way.
A few days before his six teen birthday, Markandeya's parents told him that he would soon die. Markendeya said, "I will not die. " I will pray to Shiva." He worshipped Shiva every day. On his sixteenth birthday, Yama, the god of death, came to take him. Markandeya said, "Let me finish my prayer ." Yama got angry and threw the noose over him. Shiva appeared and ordered Yama back to his kingdom saying, "Don't return to earth."
Yama went away. Nobody died on earth after that. The earth became overcrowded Goddess Earth went to Shiva and said, "I am not able to carry this huge burden. Please send Yama to earth." When Lord Shiva refused, she went to Parvati for help. When Parvati repeated the request, Shiva said, "Yama has insulted my devotee." Parvati said, "Maybe you meant that Markandeya will always remain sixteen, but that foolish Yama misunderstood." Shiva was happy. He sent Yama to earth again. Markandeya always remained sixteen.