"And the border went up to the shoulder of the Jebusite" (Joshua 18:16). This is what Scripture says: "And he and Samuel went and dwelt in Naioth" (1 Samuel 19:18), and it is written, "Behold, David is at Naioth in Ramah" (1 Samuel 19:22). Said Rabbah: what has Naioth (Naiot) to do with Ramah (height)? Rather, they sat in Ramah and busied themselves with the beauty (noi) of the world. They said: it is written, "And you shall arise and go up to the place" (Deuteronomy 17:8) — this teaches that the Temple is higher than all the Land of Israel, and the Land of Israel is higher than all the lands. They did not know where its place was. They brought the book of Joshua. Concerning the tribe of Judah it is written, "and the border went up," and concerning the tribe of Benjamin it is written "and it went down" ("and went up and turned" is not written). They concluded: this is its place. They thought to build it at Ein Etam, which is high. They said: let us bring it down a little, as it is written, "and he dwells between his shoulders" (Deuteronomy 33:12). And some say: it was a tradition that the Sanhedrin is in the portion of Judah and the Divine Presence in the portion of Benjamin, and if we raise it up too high, too much would be apportioned to Judah; better that we bring it down a little, as it is written, "and he dwells between his shoulders." And over this matter Doeg the Edomite envied David, as it is written, "for the zeal of Your house has consumed me" (Psalms 69:10). And it is written, "A song of ascents: Remember, O LORD, for David all his affliction; how he swore to the LORD, vowed to the Mighty One of Jacob: I will not enter the tent of my house... I will not give sleep to my eyes... until I find a place for the LORD, dwellings for the Mighty One of Jacob. Behold, we heard of it in Ephrath" (Psalms 132:1-6) — this is Joshua, who comes from the tribe of Ephraim; "we found it in the fields of the forest" — this is Benjamin, of whom it is written, "Benjamin is a wolf that tears" (Genesis 49:27).
How the Temple Site Was Chosen Between Judah and Benjamin
Yalkut Shimoni on Nach 24:1
(ותאר) [ועלה] הגבול [גי בן הנם] אל כתף היבוסי (יהושע יח, טז) זה שאמר הכתוב וילך הוא ושמואל וישבו בניות וכתיב הנה דוד בניות ברמה, אמר רבה וכי מה ענין ניות אצל רמה, אלא שהיו יושבין ברמה ועוסקין בנויו של עולם אמרי כתיב וקמת ועלית אל המקום מלמד שבהמ"ק גבוה מכל ארץ ישראל וארץ ישראל גבוה מכל הארצות. לא הוו ידעי מקומו היכא, איייתו ספר יהושע, (בכלהו שבטים) [בשבט יהודה] כתיב ועלה הגבול בשבט בנימן [וירד] כתיב (ועלה ותאר לא כתיב) ש"מ הכא הוא מקומו, סבור למבנייה בעין עיטם דמדלי, אמרו נחתי ביה קליל כדכתיב ובין כתפיו שכן. ואית דאמרי גמירי דסנהדרין בחלקו של יהודה ושכינה בחלקו של בנימן ואי מדלינן ליה אתפליגו ליה טובא מוטב דנחתי פורתא כדכתיב ובין כתפיו שכן, ועל דבר זה נתקנא בו דואג האדומי בדוד כדכתיב כי קנאת ביתך אכלתני, וכתיב שיר המעלות זכור ה' לדוד את כל ענותו אשר נשבע לה' נדר לאביר יעקב אם אבוא באהל ביתי אם אעלה על ערש יצועי, אם אתן שנת לעיני וגו' עד אמצא מקום לה' משכנות לאביר יעקב הנה שמענוה בארפתה זה יהושע דקא אתי משבט אפרים מצאנוה בשדי יער זה בנימן דכתיב ביה בנימין זאב יטרף: