"And knows the knowledge of the Most High" (Numbers 24:16). But did he not know the mind of his own beast, yet know the mind of the Holy One, blessed be He? Rather, he was able to determine that hour in which the Holy One, blessed be He, grows angry each day, as it is said, "and a God who is wrathful every day" (Psalms 7:12). And when does He grow angry? In the first three hours, at the hour when He sees the kings sleeping until three hours, and at the hour when they rise from their beds and place their crowns upon their heads and bow down to the sun — immediately He grows angry. Another interpretation: "And knows the knowledge of the Most High." Our Sages of blessed memory said, "And there arose not a prophet again in Israel like Moses" (Deuteronomy 34:10) — in Israel none arose, but among the nations of the world one did arise, and who was he? Balaam. And in three matters Balaam was greater than Moses, they said. For Moses our teacher, peace be upon him, did not know when the Holy One, blessed be He, wished to speak with him, but Balaam knew when the Holy One, blessed be He, wished to speak with him, as it is said, "and knows the knowledge of the Most High." Moses our teacher, peace be upon him, did not gaze upon the Divine Presence, but Balaam gazed, as it is said, "and beholds the vision of Shaddai." With Moses the Divine Presence did not speak whenever he wished, but Balaam knew when the Holy One, blessed be He, wished to speak with him, as it is said, "fallen, yet with eyes uncovered" — for he would compose himself before the Divine Presence, and immediately his eyes were uncovered, and he would speak with the Divine Presence. And why all this? So that the nations of the world should not say, "Had we a prophet like Moses, we would have heeded him." Therefore the Holy One, blessed be He, spoke with Balaam. But neither they nor their prophets availed, for there was no remedy for them nor for their prophets.
Why Balaam Knew the Hour of God's Wrath Each Day
Midrash Aggadah, Numbers 24:16
ויודע דעת עליון. אטו דעת בהמתו לא הוה ידע, ודעת הקב"ה הוא ידע, אלא שהי' יכול לכוין אותה שעה שהקב"ה כועס בה בכל יום, שנאמר ואל זועם בכל יום (תהלים ז' י"ב), ואימתי הוא כועס בשלש שעות הראשונות, בשעה שהוא רואה את המלכים ישינים עד שלשה שעות, ובשעה שעומדים ממטותיהן ומניחין את כתריהם בראשיהם ומשתחוים לחמה, מיד כועס: ד"א ויודע דעת עליון. אמרו חכמינו ז"ל ולא קם נביא עוד בישראל כמשה (דברים לד י), בישראל לא קם, אבל באומות העולם קם, ומנו בלעם, וגם שלשה דברים היה בלעם גדול ממשה אמרו כי משה רבינו ע"ה לא הי' יודע אימתי הקב"ה רוצה לדבר עמו, אבל בלעם הי' יודע אימתי הקב"ה רוצה לדבר עמו, שנאמר ויודע דעת עליון, משה רבינו ע"ה לא הי' מביט בשכינה, אבל בלעם היה מביט, שנאמר ומחזה שדי יחזה, למשה לא הית' השכינה מדברת עמו כל מה שירצה, אבל בלעם הי' יודע אימתי הקב"ה רוצה לדבר עמו, שנאמר נופל וגלוי עינים, שהי' מכיל עצמו בשכינה ומיד מגלין עיניו ומדבר עם השכינה, וכל כך למה, כדי שלא יאמרו אומות העולם אילו הי' לנו נביא כמשה, היינו שומעים לו, על כן הי' הקב"ה מדבר עם בלעם, אלא לא הם ולא נביאיהם, כי תקנה לא הי' להם ולא לנביאיהם: