Jerusalem in the Middle Ages was a major Byzantine metropolis from the 4th century CE before the advent on the early Islamic period in the 7th century saw it become the regional capital of Jund Filastin under successive caliphates. In the later Islamic period it went on to experience a period of more contested ownership, war and decline. Muslim rule was interrupted for a period of about 200 years by the Crusades and the establishment of the Christian Kingdom of Jerusalem. At the tail end of the Medieval period, the city was ceded to the Ottomans in 1517, who maintained control of it until the British took it in 1917.
Jerusalem prospered during both the Byzantine period and in the early Islamic period, but under the rule of the Fatimid caliphate beginning in the late 10th century saw its population decrease from about 200,000 to less than half that number by the time of the Christian conquest in 1099. The siege of Jerusalem by the Crusaders saw much of the extant population at the time massacred as the Christian invades took the city, and while population quickly recovered during the Kingdom of Jerusalem, its population was decimated to less than 2,000 people when the Khwarezmi Turks took the city in 1244. The city remained a backwater under the Ayyubids, Mameluks and Ottomans, and would not again exceed a population of 10,000 until the 16th century.
Terminology
The term Middle Ages (in other words: the medieval period) in regard to the history of Jerusalem, is defined by archaeologists such as S. Weksler-Bdolah as the time span consisting of the 12th and 13th centuries.
Byzantine rule
Jerusalem reached a peak in size and population at the end of the Second Temple period: The city covered two square kilometers (0.8 sq mi.) and had a population of 200,000. In the five centuries following the Bar Kokhba revolt in the 2nd century, the city remained under Roman then Byzantine rule. During the 4th century, the Roman Emperor Constantine I constructed Christian sites in Jerusalem such as the Church of the Holy Sepulchre.
John Cassian, a Christian monk and theologian who spent several years in Bethlehem during the late 4th century, wrote that 'Jerusalem can be taken in four senses: historically as the city of the Jews; allegorically as 'Church of Christ', analogically as the heavenly city of God 'which is the mother of us all,' topologically, as the soul of man".
In 603, Pope Gregory I commissioned the Ravennate Abbot Probus, who was previously Gregory's emissary at the Lombard court, to build a hospital in Jerusalem to treat and care for Christian pilgrims to the Holy Land. In 800, Charlemagne enlarged Probus' hospital and added a library to it, but it was destroyed in 1005 by Al-Hakim bi-Amr Allah along with three thousand other buildings in Jerusalem.
From the days of Constantine until the Arab conquest in 637/38, despite intensive lobbying by Judeo-Byzantines, Jews were forbidden to enter the city. Following the Arab capture of Jerusalem, the Jews were allowed back into the city by Muslim rulers such as Umar ibn al-Khattab. During the 8th to 11th centuries, Jerusalem's prominence gradually diminished as the Arab powers in the region jockeyed for control.
Early Muslim period (637/38–1099)
Crusader control
Reports of the renewed killing of Christian pilgrims, and the defeat of the Byzantine Empire by the Seljuqs, led to the First Crusade. Europeans marched to recover the Holy Land, and on July 15, 1099, Christian soldiers were victorious in the one-month Siege of Jerusalem. In keeping with their alliance with the Muslims, the Jews had been among the most vigorous defenders of Jerusalem against the Crusaders. When the city fell, the Crusaders slaughtered most of the city's Muslim and Jewish inhabitants, leaving the city "knee deep in blood".