1 Then came the daughters of Zelophehad, the son of Hepher, the son of Gilead, the son of Machir, the son of Manasseh, of the families of Manasseh the son of Joseph. And these are the names of his daughters: Mahlah, Noah, Hoglah, Milcah, and Tirzah. 2 And they stood before Moses, before Eleazar the priest, and before the princes and all the congregation by the door of the Tabernacle of the Congregation, saying, 3 "Our father died in the wilderness and he was not in the company of those who assembled themselves against the LORD in the company of Korah, but died in his own sin and had no sons. 4 Why should the name of our father be done away from among his family because he has no son? Give to us therefore a possession among the brothers of our father." 5 And Moses brought their cause before the LORD.
6 And the LORD spoke to Moses, saying, 7 "The daughters of Zelophehad speak what is right. You shall surely give them a possession of an inheritance among their father's brothers, and you shall cause the inheritance of their father to pass to them. 8 And you shall speak to the children of Israel, saying, 'If a man dies and has no son, then you shall cause his inheritance to pass to his daughter. 9 And if he has no daughter, then you shall give his inheritance to his brothers. 10 And if he has no brothers, then you shall give his inheritance to his father's brothers. 11 And if his father has no brothers, then you shall give inheritance to his kinsman who is next to him of his family, and he shall possess it. And it shall be to the children of Israel a statute of judgment, as the LORD commanded Moses.'"
12 And the LORD said to Moses, "Ascend this mount Abarim and see the land which I have given to the children of Israel. 13 And when you have seen it, you also shall be gathered to your people as Aaron your brother was gathered. 14 For you rebelled against my commandment in the desert of Zin, in the strife of the congregation, to sanctify me at the water before their eyes." That is the water of Meribah in Kadesh in the wilderness of Zin.
15 And Moses spoke to the LORD, saying, 16 "Let the LORD, the God of the spirits of all flesh, set a man over the congregation, 17 Who may go out before them, who may go in before them, who may lead them out, and who may bring them in, so that the congregation of the LORD is not as sheep which have no shepherd." 18 And the LORD said to Moses, "Take Joshua the son of Nun, a man in whom the Spirit is, and lay your hand upon him, 19 And set him before Eleazar the priest and before all the congregation and give him a charge in their sight. 20 And you shall put some of your honor upon him so that all the congregation of the children of Israel may be obedient. 21 And he shall stand before Eleazar the priest, who shall ask counsel for him after the judgment of Urim before the LORD. At his word they shall go out and at his word they shall come in—both he and all the children of Israel with him, even all the congregation." 22 And Moses did as the LORD commanded him. And he took Joshua and set him before Eleazar the priest and before all the congregation, 23 And he laid his hands upon him and gave him a charge, as the LORD commanded by the hand of Moses.
[v.12-13] - Reference, Deuteronomy 32:48-50.
[v.14] - Reference, Numbers 20:8-13.