<P> The history of Jerusalem during the Middle Ages is generally one of decline; beginning as a major city in the Byzantine Empire, Jerusalem prospered during the early centuries of Muslim control (640--969), but under the rule of the Fatimid caliphate (late 10th to 11th centuries) its population declined from about 200,000 to less than half that number by the time of the Christian conquest in 1099 . The Christians massacred much of the population as they took the city, and while population quickly recovered during the Kingdom of Jerusalem, it was again decimated to below 2,000 people when the Khwarezmi Turks retook the city in 1244 . After this, the city remained a backwater of the late medieval Muslim empires and would not again exceed a population of 10,000 until the 16th century . It was passed back and forth through various Muslim factions until decidedly conquered by the Ottomans in 1517, who maintained control until the British took it in 1917 . </P> <P> 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 . </P> <P> 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 . </P>

Who controlled the holy land of jerusalem up until the 7th century