This city has known many wars, and various periods of occupation. According to Genesis 14:18-20, the city (named as Salem) was ruled by king Melchizedek, a priest of God. According to one Jewish tradition reported by the midrash, it was founded by Abraham's forefathers Shem and Eber.
Later, according to the Biblical narrative of the Books of Samuel, it was controlled by the Jebusites, a group that scholars generally believe to have been Hittite.
It is probable that Melchizedek was himself a Jebusite; the -zedek part of the name occurring in other rulers such as Adonizedek, and in some biblical references to Jerusalem itself, such as neweh zedek (Jeremiah 31:23, where it is often translated as home of righteousness).