"I see him, but not now" (Numbers 24:17). He said: I shall see the one who will arise to despoil Moab — this is David son of Jesse, who measured them with ropes, and with two ropes he put to death and with the third rope he kept alive. "I behold him, but not near" — this is the King Messiah, over whom Israel are destined to rule in his days, as it is said, "Edom and Moab shall be the laying on of their hand, and the children of Ammon shall obey them" (Isaiah 11:14). "A star steps forth from Jacob" — because Israel are likened to stars. And what is "a star steps forth (darakh kokhav)"? As you say, "and you shall tread upon their high places" (Deuteronomy 33:29) — and this was "treading." "And a scepter rises from Israel" — this is the King Messiah, as it is said, "And a shoot shall come forth from the stock of Jesse" (Isaiah 11:1). "And it smites the corners of Moab" — as you say, "Edom and Moab shall be the laying on of their hand, and the children of Ammon shall obey them" (Isaiah 14:11). "And it tears down all the sons of Seth" — that he will demolish all the nations, who are the sons of Seth. And "qarqar" means nothing but tearing down, as it is said, "tearing down the wall (meqarqar qir) and crying to the mountain" (Isaiah 22:5).
Balaam's Star Prophecy as David and the King Messiah Over Moab
Midrash Aggadah, Numbers 24:17
אראנו ולא עתה. אמר אראה מי שיעמוד לשלל מואב, ה דוד בן ישי, שהי' מודדם בחבלים, והשני החבלים הורג והשלישי מחיה: אשורנו ולא קרוב. זה המלך המשיח שעתידין ישראל לשלוט עליהם בימיו, שנאמר אדום ומואב משלוח ידם וגו' (ישעיה יא יד): דרך כוכב מיעקב. לפי שישראל נמשלו לכוכבים, ומהו דרך כוכב, כמה דתימר ואתה על במתימו תדרוך (דברים לג כ"ט), וזה הי' דרך: וקם שבט מישראל. זה מלך המשיח, שנאמר ויצא חוטר מגזע ישי (ישעיה יא א): ומחץ פאתי מואב. כמה דתימר אדום ומואב משלוח ידם ובני עמון משמעתם (ישעיה י"ד י"א): וקרקר כל בני שת. שיהרוס כל הגוים שהם בני שת, ואין קרקר אל לשון הריסה, שנאמר מקרקר קיר ושוע אל ההר (ישעיה כב ה'):