"Water shall flow from his buckets" (Numbers 24:7) — that sages and masters of Torah would come forth from her, as you say, "Ho, everyone who thirsts, come to the waters" (Isaiah 55:1). Another interpretation: they merited prophecy, as you say, "a fountain of living waters" (Jeremiah 17:13), and as it is said, "for I will pour water upon the thirsty" (Isaiah 44:3). Another interpretation: that the Holy One, blessed be He, purified them of their iniquities, as in "and I will sprinkle clean water upon you" (Ezekiel 36:25). Another interpretation: that they would do repentance and the Holy One, blessed be He, receives them. Another interpretation: "Water shall flow from his buckets" — as you say, "and you shall draw water in joy from the wells of salvation" (Isaiah 12:3). "And his seed in many waters" — that the King Messiah would come forth from them, who would rule over many waters, over all the peoples, even though the Edomites preceded them to kingship, as it is said, "and these are the kings who reigned in the land of Edom" (Genesis 36:31). This matter would not be theirs for long; rather, at the time when Agag would be king, at that hour their kingship would cease, and Saul would come and take him. And afterward the kingship would cease from Saul, and the kingship of David son of Jesse would be exalted, for the Holy One, blessed be He, cut a covenant with him that his sons would all be kings, and he would rule over Edom, as it is said, "and all Edom became servants to David" (1 Chronicles 18:13). "God who brought them out of Egypt" — just as He had power at the time when He brought them out of Egypt, so He has might and loftiness to feed them all the kings of the nations of the land of Canaan. Therefore it is said, "he shall devour the nations his adversaries" — these are the rest of the people. "And shall break their bones" — these are their kings, whom they will kill and take their money. "And pierce them with his arrows" — that they will inherit their land.
Balaam's Oracle of Flowing Waters and the King Greater Than Agag
Midrash Aggadah, Numbers 24:7
יזל מים מדליו. שיצאו ממנה חכמים ובעלי תורה, כמה דתימר הוי כל צמא לכו למים (ישעיה נ"ה א): ד"א זכו לנביאות, כמה דתימר מקור מים חיים (ירמיה י"ז י"ג), וכמו שנאמר כי אצק מים על צמא (ישעיה מ"ד ג'): ד"א שטיהר אותם הקב"ה מעוונותיהם, כמו וזרקתי עליכם מים טהורים (יחזקאל ל"ו כ"ה): ד"א שיעשו תשובה והקב"ה מקבלם: ד"א יזל מים מדליו. כמה דתימר ושאבתם מים בששון ממעיני הישועה (ישעיה י"ב ג'): וזרעו במים רבים. שיצא מהם מלך המשיח שישלוט במים רבים בכל העמים, אעפ"י שקדמו אדומיים למלכות לפניהם, שנאמר ואלה המלכים אשר מלכו בארץ אדום (בראשית ל"ו ל"א), דבר זה לא יהי' להם לאורך, אלא בעת שיהי' אגג מלך אותה שעה יפסוק מלכותם ויבוא שאול ויקחנו, ואחר כך יפסוק המלכות משאול ותנשא מלכותו של דוד בן ישי, שכרת לו הקב"ה ברית שיהיו בניו הכל מלכים, והוא יהיה ושל באדום, שנא' ויהיו [כל] אדום עבדים לדוד (דה"א יח יג): אל מוציאם ממצרים. כשם הי' בו כח בזמן שהוציאם ממצרים, כך יש לו תוקף לרוממות להאכילם כל מלכי גוים של ארץ כנען, לכך נאמר יאכל גוים צריו, אלו שאר העם: ועצמותיהם יגרם. אלו מלכיהם שיהרגו אותם ויקחו ממונם: וחציו ימחץ. שינחלו ארצם: