How was the land of Israel divided up between the tribes when they entered the land?
The pasuk in Sefer Bamidbar teaches (26:55-56) that all of the tribes received a fair and equivalent portion, whether the tribe was large or small. This was done by means of a system that included both a lottery as well as consultation with the Urim VeTummim. The Gemara describes the process as follows:
Elazar HaKohen stood in the garments of the High Priest, including the Urim VeTummim, with Yehoshua and the entire Jewish people standing before him. Also in front of him were two boxes, one with the name of each of the tribes and the other with the proposed divisions of the land. According to the Gemara, Elazar would first announce a tribe and its allotted inheritance and then he would reach into the two boxes, from which he would remove those same pieces of information, thereby assuring the people that his prophetic statement was correct. This method assured that even those tribes that received less preferable pieces of land could not complain that his division was unfair.
The Gemara is forced to describe this complicated lottery method because of a discrepancy between two pesukim. On the one hand, the Torah teaches that the land would be divided akh be-goral – by means of a lottery. On the other hand, it says that the land would be divided al pi ha-goral – by the voice of the lottery. Although there are midrashim that interpret this to mean that the lottery itself miraculously cried out (see Bamidbar Rabba 21:9), our Gemara offers a more rational interpretation – that Elazar HaKohen announced the results of the lottery based on his prophecy by means of the Urim VeTummim. The Ramah offers a further support for this interpretation by pointing out the parallel language – al piv yetzu – describing how Elazar HaKohen assisted Yehoshua in leading the people after Moshe’s death (see Bamidbar 27:21).