A Brahmana approached Yudhishthira in Dwaitavana forest, and requested for his help in retrieving his fire sticks and churning-staff required for conducting the Agnihotra,which were carried away by a fleeting deer:-
And approaching without loss of time Ajatasatru seated in that forest with his brothers, the Brahmana, in great distress, spake these words, 'As a deer was butting about, it happened, O king, that my fire-sticks and churning staff which had been placed against a large tree stuck fast to its antlers. O king, that powerful deer of exceeding fleetness hath speedily gone out of the hermitage with long bounds, taking those articles away. Tracking that powerful deer, O king, by its foot-prints, do ye, ye sons of Pandu, bring back those articles of mine, so that my Agnihotra may not be stopped!'
Yudhishthira and his brothers tried to capture the deer, but in vain:-
And putting on their corselets and equipped with their bows, those bulls among men, intent upon serving the Brahmana, swiftly sallied out in the wake of the deer. And descrying the deer at no great distance, those mighty warriors discharged at it barbed arrows and javelins and darts, but the sons of Pandu could not pierce it by any means. And as they struggled to pursue and slay it, that powerful deer became suddenly invisible.
And after losing sight of the deer, the Pandavas were fatigued and disappointed and afflicted with hunger and thirst.Since all the Pandava brothers were fatigued and thirsty, Yudhishthira asked Nakula to search for water
Then king Yudhishthira addressed Nakula saying, 'Do thou, O son of Madri, climb this tree and look around the ten points of the horizon. Do thou see whether there is water near us or such trees as grow on watery grounds! O child, these thy brothers are all fatigued and thirsty.Thereupon saying, 'So be it,' Nakula speedily climbed up a tree, and having looked around, said unto his eldest brother, 'O king, I see many a tree that groweth by the water-side, and I hear also the cries of cranes. Therefore, without doubt, water must be somewhere here.
Then Nakula was sent to the nearby crystal lake to get water for all the Pandavas.When Nakula did not return after a long time,Sahdeva was sent by prince Yudhishthira to enquire about Nakula's welfare.And after that, it was the turn of Arjuna and Bhima.In this manner four of the Pandava brothers approached the crystal lake, one after the other.The brothers(except Yudhishthira), died one after the other, as they decided to drink water from the crystal lake, inhabited by cranes, without first answering the question asked by an invisible Yaksha, who was present there.Yudhishtra got very worried when his four brothers failed to return, and he then approached that crystal lake.
Yudhishthira, however did not drink the water and instead performed his ablutions in the lake.
Who, therefore, save Yama himself who in due time bringeth about the end of all things, could have baffled them thus.' And having concluded this for certain, he began to perform his ablutions in that lake.
Subsequently, Yudhishthira answered all the questions asked by the invisible Yaksha and the Yaksha disclosed his true identity(Dharmraja Yama) and asked Yudhishthira to ask for the life of any one of his brothers:-
Therefore, let one only amongst thy brothers, whom thou mayst wish, get up with life!
Yudhishthira then asked for Nakulas's life.The Yaksha then asked a series of questions to ascertain why Yudhishthira selected Nakula over his other brothers.The Yaksha was very pleased with all the answers given by Yudhishthira and revived all four Pandava brothers.
The Yaksha said,--'Since abstention from injury is regarded by thee as higher than both profit and pleasure, therefore, let all thy brothers live, O bull of Bharata race!
Thereafter,Yudhishthira wanted to know the true identity of the Yaksha and said:-
I ask thee that art incapable of being vanquished and that standest on one leg in the tank, what god art thou, for I cannot take thee for a Yaksha! Art thou the foremost of the Vasus, or of the Rudras, or of the chief of the Maruts? Or art thou the lord himself of the celestials, wielder of the thunder-bolt! Each of these my brothers is capable of fighting as hundred thousand warriors, and I see not the warrior that can slay them
At this the Yaksha replied:-
O child, I am even thy father, the Lord of justice, possessed of great prowess! Know, bull of the Bharata race, that I came hither desirous of beholding thee!. I am well-pleased to witness thy harmlessness; and, O sinless one, I will confer boons on thee. Do thou, O foremost of kings, ask of me boons. I shall surely confer them, O sinless one!
Prince Yudhishthira asked three more boons from Yama,on being asked to do so,by him:-
1.First boon:-
Therefore, the first boon that I shall ask, is, may that Brahmana's adorations to Agni be not interrupted!' The Yaksha said,--'O Kunti's son endued with splendour, it was I who for examining thee, was carrying away, in the guise of a deer, that Brahmana's fire-sticks! Thereupon that worshipful one said,--'I give thee this boon!
2.The second boon:-
Yudhishthira said,--'We have spent these twelve years in the forest; and the thirteenth year is come. May no one recognise us, as we spend this year somewhere.'Vaisampayana continued,-'Thereat that worshipful one replied,--'I give this boon unto thee!'
3.The third boon:-
Thereat Yudhishthira said,--'It is enough that I have beheld thee with my senses, eternal God of gods as thou art! O father, whatever boon thou wilt confer on me I shall surely accept gladly! May I, O lord, always conquer covetousness and folly and anger, and may my mind be ever devoted to charity, truth, and ascetic austerities! The Lord of justice said,--'Even by nature, O Pandava, hast thou been endued with these qualities, for thou art the Lord of justice himself! Do thou again attain what thou asked for!"
Reference:-The Mahabharata Book 3: Vana Parva, Aranya Parva