"For we have heard how the LORD dried up the waters of the Red Sea before you" (Joshua 2:10). Rabbi Shimon ben Elazar said: When Israel does the will of the Omnipresent, His name is magnified in the world, as it is said, "For we have heard how He dried up..." "for the LORD your God, He is God," and it says, "And it came to pass, when all the kings of the Amorites heard..." But when Israel does not do the will of the Omnipresent, His name is profaned in the world, as it is said, "And when they came to the nations where they came, they profaned My holy name, in that men said of them, These are the people of the LORD, and they have gone out of His land" (Ezekiel 36:20). "For the LORD your God, He is God in heaven above and on earth beneath" (Joshua 2:11). Jethro said, "Now I know that the LORD is greater than all gods" (Exodus 18:11) -- they said he left no idolatry in the world that he had not worshiped; therefore he said "than all gods," granting substance to idolatry. Naaman acknowledged the matter more fully: "Behold, now I know that there is no God in all the earth, but in Israel" (2 Kings 5:15). But Rahab acknowledged the matter more than all of them: "for the LORD your God, He is God in heaven above and on earth beneath." The Holy One, blessed be He, said to Rahab: You said "for the LORD your God is God" -- on earth, well and good; but in heaven above, you spoke of what you did not see with your own eyes. By your life, your descendant shall stand and see what even the prophets did not see, as is said, "the heavens were opened, and I saw visions of God" (Ezekiel 1:1). Rahab left a portion in the empty space of the world; Moses came and said, "Unto you it was shown, that you might know... and there is none else" (Deuteronomy 4:35) -- even in the empty space of the world. The Holy One, blessed be He, said to him: You said "and there is none else"; give him of the fruit of his hands -- "And there arose not a prophet since in Israel like Moses" (Deuteronomy 34:10).
Rahab Confesses the LORD in Heaven Above and on Earth Below
Yalkut Shimoni on Nach 10:1
כי שמענו את אשר הוביש ה' את מי ים סוף מפניכם (יהושע ב י). א"ר שמעון בן אלעזר כשישראל עושין רצונו של מקום שמו מתגדל בעולם שנאמר כי שמענו את אשר הוביש וגו' כי ה' אלהיכם הוא אלהים וגו', ואומר ויהי כשמוע כל מלכי האמורי וגו', וכשאין ישראל עושין רצונו של מקום שמו מתחלל בעולם שנאמר ויבואו אל הגוים אשר באו שמה ויחללו את שם קדשי באמור להם עם ה' אלה ומארצו יצאו. כי ה' אלהיכם הוא אלהים בשמים ממעל ועל הארץ מתחת, יתרו אמר כי גדול ה' מכל האלהים, אמרו שלא הניח ע"ז בעולם שלא עבדה לכך אמר מכל האלהים נתן ממש בע"ז. ונעמן הודה בדבר יותר הנה נא ידעתי כי אין אלהים בכל הארץ כי אם בישראל. ורחב הודה בדבר יותר מהם כי ה' אלהיכם הוא אלהים בשמים ממעל ועל הארץ מתחת. אמר הקב"ה לרחב את אמרת כי ה' אלהיכם הוא אלהים ניחא בארץ שמא בשמים ממעל את אמרת מה שלא ראית בעינניך חייך שבנך עומד ורואה מה שלא ראו הנביאים כמד"א נפתחו השמים ואראה מראות אלהים. רחב שיירה בחללו של עולם בא משה ואמר אתה הראת לדעת וגו' עד ואין עוד, אפי' בחללו של עולם, א"ל הקב"ה אתה אמרת ואין עוד תנו לו מפרי ידיו ולא קם נביא עוד בישראל כמשה: