Numbers 27:17
15 Then Moses spoke to the Lord: 16 “Let the Lord, the God of the spirits of all humankind, appoint a man over the community, 17 who will go out before them, and who will come in before them, and who will lead them out, and who will bring them in, so that the community of the Lord may not be like sheep that have no shepherd.” 18 The Lord replied to Moses, “Take Joshua son of Nun, a man in whom is the Spirit, and lay your hand on him; 19 set him before Eleazar the priest and before the whole community, and commission him publicly.
1 Kings 22:17
15 When he came before the king, the king asked him, “Micaiah, should we attack Ramoth Gilead or not?” He answered him, “Attack! You will succeed; the Lord will hand it over to the king.” 16 The king said to him, “How many times must I make you solemnly promise in the name of the Lord to tell me only the truth?” 17 Micaiah said, “I saw all Israel scattered on the mountains like sheep that have no shepherd. Then the Lord said, ‘They have no master. They should go home in peace.’” 18 The king of Israel said to Jehoshaphat, “Didn’t I tell you he does not prophesy prosperity for me, but disaster?” 19 Micaiah said, “That being the case, listen to the Lord’s message. I saw the Lord sitting on his throne, with all the heavenly assembly standing beside him on his right and on his left.
Notes and References
"... The depiction of the shepherd David as national monarch is perhaps an intertextual allusion to Numbers 27:17 where the idea of “going out and bringing in” is used in coordination with the shepherding of YHWH’s people. Moses petitions YHWH to appoint a person to succeed him who “shall go out before them and come in before them, who shall lead them out and bring them in” so that Israel will not be “like sheep without a shepherd”. This same negative conception of a shepherdless flock is used again in 1 Kings 22:17 (2 Chronicles 18:16) to describe a military defeat. In this passage Micaiah prophesies against Ahab, king of Israel, saying: “I saw all of Israel scattered on the mountains, as sheep that have no shepherd”. YHWH’s appointment and installation of David as Israel’s Shepherd-King and the establishment of his dynasty forever (2 Samuel 7:8–16) was to ensure that Israel would not be in such a vulnerable and desperate condition ..."
Willitts, Joel Matthew’s Messianic Shepherd-King: In Search of "the Lost Sheep of the House of Israel" (pp. 56-57) De Gruyter, 2007