Upon entering the Land of Israel, each tribe received a portion appropriate to its needs. Which shevet (tribe) received the city of Jerusalem?
A quick review of a map indicates that Jerusalem was split between the tribes of Yehuda (to the south) and Binyamin (to the north). Our Gemara argues that there is a disagreement between the tanna’im. The Tanna Kamma believes that Jerusalem was a separate entity, and that it was not divided between the shevatim; Rabbi Yehuda argues that Jerusalem was divided, and, in fact the border between Yehuda and Binyamin ran through the Temple itself, with the Temple Mount offices on Yehuda’s side and the sanctuary and Holy of Holies on Binyamin’s. A baraita that is brought describes how there was also a “panhandle” of sorts that encroached northward and included the area of the altar within the official boundaries of shevet Yehuda.
The Si’ah Yitzhak explains that all opinions agree that the area where the City of Jerusalem was built had originally been split between Yehuda and Binyamin. The disagreement in our Gemara is whether when the decision was made to make Jerusalem the spiritual center of the Jewish people the entire city became a separate entity, or perhaps Jerusalem remained within the confines of the two shevatim, and only the area of the Temple itself had extraterritorial status.
There are some sources that do not place the altar entirely within the boundaries of shevet Yehuda, rather within shevet Binyamin, with the exception of the south-eastern corner that was in Yehuda. Even so, the Gemara relates a tradition that Binyamin himself “saw” (apparently in a prophetic vision) that the altar – or a significant part of it – would not be in his portion, and was so disturbed by this that as a consolation prize he became the host (ushpizekhan) to the Almighty in that the Holy of Holies was built in his portion.