Gateway to Heaven
One who prays outside of Eretz Yisrael should face Eretz Yisrael, and one who prays in Eretz Yisrael should face Yerushalayim.
Both of these directives are deduced from the prayer of King Solomon at the inauguration of the Beit HaMikdash, in which he appealed to God to accept the prayers of His people in all places and all circumstances. Should they be taken away from their Land into foreign captivity because of their sins, he asked that their repentent “prayers directed to God through their Land” be accepted (Melachim I 8:48). Should they be engaged in war in their own land, he asked that their prayer for heavenly help “directed to God through the city You have chosen” be accepted (ibid., 44).
Although King Solomon was referring to particular circumstances placing Jews outside their land and their city, he set the guidelines for how Jews in all times must direct their prayers to Heaven through the holy Land and the holy city where the holy house of God stood.
(Berachot 30a)