Antiquity (Prehistory - 6 CE)
Archaeological ruins from King David's time This city has known many wars and various periods of occupation. According to Jewish tradition it was founded by Abraham's forefathers Shem and Eber. In Genesis it was ruled by Melchizedek, regarded in Jewish tradition as being a priest of God and identical to Shem. Later it was conquered by the Jebusites. After this it came under Jewish control. The Bible records that King David defeated the Jebusites in war and captured the city without destroying it. David then expanded the city to the south, and declared it the capital city of the united Kingdom of Israel.
Later, according to the Bible, the First Jewish Temple was built in Jerusalem by King Solomon.
The Temple became a major cultural center in the region, eventually overcoming other ritual centers such as Shilo and Bethel. Near the end of the reign of King Solomon, the northern ten tribes split off to form the Kingdom of Israel with its capital at Samaria. Jerusalem then become the capital of the southern kingdom, the Kingdom of Judah.
By the end of the "First Temple Period," Jerusalem was the sole acting religious shrine in the kingdom and a center of regular pilgrimage. Although recent archaeological finds may push the date yet earlier (see Tel Dan Stele), around the ninth century BCE clear historical records begin to corroborate some of the biblical history, the kings of Judah become historically identifiable, and the significance the Temple had in Jewish religious life is clear.
Jerusalem was the capital of the Kingdom of Judah for some 400 years. It had survived (or, as some historians claim, averted) an Assyrian siege in 701 BCE, unlike Samaria, the capital of the northern Kingdom of Israel, which had fallen some twenty years previously. However, the city was overcome by the Babylonians in 586 BCE, who then took the young king Jehoiachin into Babylonian captivity, together with most of the aristocracy. However, the country rebelled again under Zedekiah, prompting the city's repeated conquest and destruction by Nebuchadnezzar. The Temple was burnt, and the city's walls were ruined, thus rendering what remained of the city unprotected.
After several decades of captivity and the Persian conquest of Babylon, the Persians allowed the Jews to return to Judah and rebuild the city's walls and the Temple. It has continued to be the capital of Judah and center of Jewish worship, as a province under the Persians, Greek and Romans, with a relatively short period of independence under the Hasmonean Kingdom. The Temple complex was upgraded and the Temple itself rebuilt under Herod the Great, a Jewish client-king under Roman rule, around 19 BCE. That structure is known as the Second Temple, and was the most important of the many improvements Herod made to the city. After Herod's death, the province and city came under direct Roman rule in 6 CE.
Roman Rule (6 CE - 638 CE)
After a brief period of oppressive Roman rule, the city was ruined yet again when a civil war accompanied by a revolt against Rome in Judea led to the city's repeated sack and ruin at the hands of Titus in 70 CE. The Second Temple was burnt, and the whole city was ruined. The only remaining part of the Temple was a portion of an external (retaining) wall which became known as the Western Wall.
After the end of this first revolt, the Jews continued to live in Jerusalem in significant numbers, and were allowed to practice their religion. In the second century the Roman Emperor Hadrian began to rebuilt Jerusalem as a pagan city while restricting some Jewish practices. Angry at this affront, the Judeans again revolted led by Simon Bar Kokhba. Hadrian responded with overwhelming force, putting down the revolution and killing as many as half a million Jews, and resettling the city as a pagan polis under the name Aelia Capitolina. Jews were forbidden to enter the city, but for a single day of the year, Tisha B'Av, (the Ninth of Av, see Hebrew calendar), when they could weep for the destruction of their city at the Temple's only remaining wall.
For another 150 years, the city remained a relatively unimportant Roman town. Under Byzantine Emperor Constantine, however, rebuilt Jerusalem as a Christian center of worship, building the Church of the Holy Sepulcher in 335. Jews were banned from the city, except under a brief period of Persian rule from 614-629.
Arab, Crusader, and Early Ottoman Rule (638-1800s)
Map of Jerusalem as it appeared in the years 958-1052, according to Arab geographers such as al-Muqaddasi. Although the Qur'an does not mention the name "Jerusalem", the Hadith specifies that it was from Jerusalem that the Prophet Muhammad ascended to heaven in the Night Journey, or Isra and Miraj. The city was one of the Arab Caliphate's first conquests in 638 CE; according to Arab historians of the time, the Caliph Umar ibn al-Khattab personally went to the city to receive its submission, cleaning out and praying at the Temple Mount in the process. Some Muslim and non-Muslim sources add that he built a mosque there. Sixty years later, the Dome of the Rock was built, a structure in which there lies the stone where Muhammad is said to have tethered his mount Buraq during the Isra. This is also reputed to be the place where Abraham went to sacrifice his son (Isaac in the Jewish tradition, Ishmael in the Muslim one.) Note that the octagonal and gold-sheeted Dome is not the same thing as the Al-Aqsa Mosque beside it, which was built more than three centuries later.
Crusader, Ayyubid, and Mamluk period
In 1099, The Fatimid ruler expelled the native Christian population before Jerusalem was conquered by the Crusaders, who massacred most of its Muslim and Jewish inhabitants when they took the solidly defended city by assault, after a period of siege; later the Crusaders created the Kingdom of Jerusalem. By early June 1099 Jerusalemís population had declined from 70,000 to less than 30,000.
In 1187, the city was wrested from the Crusaders by Saladin who permitted Jews and Muslims to return and settle in the city. Under the Ayyubid dynasty of Saladin, a period of huge investment began in the construction of houses, markets, public baths, and pilgrim hostels as well as the establishment of religious endowments. However, for most of the 13th century, Jerusalem declined to the status of a village due to city's fall of strategic value and Ayyubid internecine struggles.
In 1244, Jerusalem was sacked by the Khwarezmian Tartars, who decimated the city's Christian population and drove out the Jews. The Khwarezmian Tartars were driven out by the Ayyubids in 1247. From 1250 to 1517, Jerusalem was ruled by the Mamluks. During this period of time many clashes occurred between the Mamluks on one side and the crusaders and the Mongols on the other side. The area also suffered from many earthquakes and black plague.