Lhasa literally means "place of the gods". Ancient Tibetan documents and inscriptions demonstrate that the place was called Rasa, which either meant "goats' place", or, as a contraction of rawe sa, a "place surrounded by a wall," or 'enclosure', suggesting that the site was originally a hunting preserve within the royal residence on Marpori Hill. Lhasa is first recorded as the name, referring to the area's temple of Jowo, in a treaty drawn up between China and Tibet in 822 C.E.