According to the Hebrew Bible, before King David's conquest of Jerusalem in the 11th century BCE the city was home to the Jebusites. The Bible describes the city as heavily fortified with a strong city wall, a fact confirmed by archaeology. The Bible names the city ruled by King David as the City of David, in Hebrew Ir David, which was identified southeast of the Old City walls, outside the Dung Gate. In the Bible, David's son, King Solomon, extended the city walls to include the Temple and Temple Mount.
The city was largely extended westwards after the Neo-Assyrian destruction of the northern Kingdom of Israel and the resulting influx of refugees. Destroyed by Nebuchadnezzar in 586 BCE, it was rebuilt on a smaller scale in about 440 BCE, during the Persian period, when, according to the Bible, Nehemiah led the Jews who returned from the Babylonian Exile. An additional, so-called Second Wall, was built by King Herod the Great. In 41–44 CE, Agrippa, king of Judea, started building the so-called "Third Wall" around the northern suburbs. The entire city was totally destroyed by the Romans in 70 CE.
Old Roman era gate beneath the Damascus Gate
The northern part of the city was rebuilt by the Emperor Hadrian around 130, under the name Aelia Capitolina. In the Byzantine period Jerusalem was extended southwards and again enclosed by city walls.
Muslims occupied Byzantine Jerusalem in the 7th century (637 CE) under the second caliph, `Umar Ibn al-Khattab who annexed it to the Islamic Arab Empire. He granted its inhabitants an assurance treaty. After the siege of Jerusalem, Sophronius welcomed `Umar, allegedly because, according to biblical prophecies known to the Church in Jerusalem, "a poor, but just and powerful man" would rise to be a protector and ally to the Christians of Jerusalem. Sophronius believed that `Umar, a great warrior who led an austere life, was a fulfillment of this prophecy. In the account by the Patriarch of Alexandria, Eutychius, it is said that `Umar paid a visit to the Church of the Holy Sepulchre and sat in its courtyard. When the time for prayer arrived, however, he left the church and prayed outside the compound, in order to avoid having future generations of Muslims use his prayer there as a pretext for converting the church into a mosque. Eutychius adds that `Umar also wrote a decree which he handed to the Patriarch, in which he prohibited Muslims gathering in prayer at the site.
Outer wall of Tower of David
In 1099, Jerusalem was captured by the Western Christian army of the First Crusade and it remained in their hands until recaptured by the Arab Muslims, led by Saladin, on October 2, 1187. He summoned the Jews and permitted them to resettle in the city. In 1219, the walls of the city were razed by Mu'azzim Sultan of Damascus; in 1229, by treaty with Egypt, Jerusalem came into the hands of Frederick II of Germany. In 1239 he began to rebuild the walls, but they were demolished again by Da'ud, the emir of Kerak. In 1243, Jerusalem came again under the control of the Christians, and the walls were repaired. The Kharezmian Tatars took the city in 1244 and Sultan Malik al-Muazzam razed the walls, rendering it again defenseless and dealing a heavy blow to the city's status.
The current walls of the Old City were built in 1535–42 by the Ottoman Turkish sultan Suleiman the Magnificent. The walls stretch for approximately 4.5 km (2.8 miles), and rise to a height of between 5 and 15 metres (16.4–49 ft), with a thickness of 3 metres (10 feet) at the base of the wall. Altogether, the Old City walls contain 35 towers, of which 15 are concentrated in the more exposed northern wall. Suleiman's wall had six gates, to which a seventh, the New Gate, was added in 1887; several other, older gates, have been walled up over the centuries. The Golden Gate was at first rebuilt and left open by Suleiman's architects, only to be walled up a short while later. The New Gate was opened in the wall surrounding the Christian Quarter during the 19th century. Two secondary gates were reopened in recent times on the southeastern side of the city walls as a result of archaeological work.
In 1980, Jordan proposed that the Old City be listed as a UNESCO World Heritage Site. It was added to the List in 1981. In 1982, Jordan requested that it be added to the List of World Heritage in Danger. The United States government opposed the request, noting that the Jordanian government had no standing to make such a nomination and that the consent of the Israeli government would be required since it effectively controlled Jerusalem. In 2011, UNESCO issued a statement reiterating its view that East Jerusalem is "part of the occupied Palestinian territory, and that the status of Jerusalem must be resolved in permanent status negotiations."