The LORD said to Moses, "Go up into this mountain of Ab'arim, and see the land which I have given to the people of Israel. And when you have seen it, you also shall be gathered to your people, as your brother Aaron was gathered, because you rebelled against my word in the wilderness of Zin during the strife of the congregation, to sanctify me at the waters before their eyes." (These are the waters of Mer'ibah of Kadesh in the wilderness of Zin.)
Moses said to the LORD, "Let the LORD, the God of the spirits of all flesh, appoint a man over the congregation, who shall go out before them and come in before them, who shall lead them out and bring them in; that the congregation of the LORD may not be as sheep which have no shepherd."
And the LORD said to Moses, "Take Joshua the son of Nun, a man in whom is the spirit, and lay your hand upon him; cause him to stand before Elea'zar the priest and all the congregation, and you shall commission him in their sight. You shall invest him with some of your authority, that all the congregation of the people of Israel may obey. And he shall stand before Elea'zar the priest, who shall inquire for him by the judgment of the Urim before the LORD; at his word they shall go out, and at his word they shall come in, both he and all the people of Israel with him, the whole congregation."
And Moses did as the LORD commanded him; he took Joshua and caused him to stand before Elea'zar the priest and the whole congregation, and he laid his hands upon him, and commissioned him as the LORD directed through Moses.