In 637, shortly after Jerusalem was captured by the Muslim armies, 'Umar ibn al-Khattāb, the second Caliph, promised that the Church of the Nativity would be preserved for Christian use.
A mosque dedicated to Umar was built upon the place in the city where he prayed, next to the church.
Bethlehem then passed through the control of the Islamic caliphates of the Umayyads in the 8th century, then the Abbasids in the 9th century.
A Persian geographer recorded in the mid-9th century that a well preserved and much venerated church existed in the town.
In 985, the Arab geographer al-Muqaddasi visited Bethlehem, and referred to its church as the "Basilica of Constantine, the equal of which does not exist anywhere in the country-round."
In 1009, during the reign of the sixth Fatimid Caliph, al-Hakim bi-Amr Allah, the Church of the Nativity was ordered to be demolished, but was spared by local Muslims, because they had been permitted to worship in the structure's southern transept.

In 1099, Bethlehem was captured by the Crusaders, who fortified it and built a new monastery and cloister on the north side of the Church of the Nativity.
The Greek Orthodox clergy were removed from their sees and replaced with Latin clerics.
Up until that point the official Christian presence in the region was Greek Orthodox.
On Christmas Day 1100, Baldwin I, first king of the Frankish Kingdom of Jerusalem, was crowned in Bethlehem, and that year a Latin episcopate was also established in the town.

In 1187, Saladin, the Sultan of Egypt and Syria who led the Muslim Ayyubids, captured Bethlehem from the Crusaders.
The Latin clerics were forced to leave, allowing the Greek Orthodox clergy to return.
Saladin agreed to the return of two Latin priests and two deacons in 1192.
However, Bethlehem suffered from the loss of the pilgrim trade, as there was a sharp decrease of European pilgrims.
William IV, Count of Nevers had promised the Christian bishops of Bethlehem that if Bethlehem should fall under Muslim control, he would welcome them in the small town of Clamecy in present-day Burgundy, France.
As a result, the Bishop of Bethlehem duly took up residence in the hospital of Panthenor, Clamecy, in 1223.
Clamecy remained the continuous 'in partibus infidelium' seat of the Bishopric of Bethlehem for almost 600 years, until the French Revolution in 1789.

Bethlehem, along with Jerusalem, Nazareth, and Sidon, was briefly ceded to the Crusader Kingdom of Jerusalem by a treaty between Holy Roman Emperor Frederick II and Ayyubid Sultan al-Kamil in 1229, in return for a ten-year truce between the Ayyubids and the Crusaders.
The treaty expired in 1239, and Bethlehem was recaptured by the Muslims in 1244.
In 1250, with the coming to power of the Mamluks under Rukn al-Din Baibars, tolerance of Christianity declined.
Members of the clergy left the city, and in 1263 the town walls were demolished.
The Latin clergy returned to Bethlehem the following century, establishing themselves in the monastery adjoining the Basilica of the Nativity.
The Greek Orthodox were given control of the basilica and shared control of the Milk Grotto with the Latins and the Armenians.
In 637, shortly after Jerusalem was captured by the Muslim armies, 'Umar ibn al-Khattāb, the second Caliph, promised that the Church of the Nativity would be preserved for Christian use. A mosque dedicated to Umar was built upon the place in the city where he prayed, next to the church. Bethlehem then passed through the control of the Islamic caliphates of the Umayyads in the 8th century, then the Abbasids in the 9th century. A Persian geographer recorded in the mid-9th century that a well preserved and much venerated church existed in the town. In 985, the Arab geographer al-Muqaddasi visited Bethlehem, and referred to its church as the "Basilica of Constantine, the equal of which does not exist anywhere in the country-round." In 1009, during the reign of the sixth Fatimid Caliph, al-Hakim bi-Amr Allah, the Church of the Nativity was ordered to be demolished, but was spared by local Muslims, because they had been permitted to worship in the structure's southern transept.
In 1099, Bethlehem was captured by the Crusaders, who fortified it and built a new monastery and cloister on the north side of the Church of the Nativity. The Greek Orthodox clergy were removed from their sees and replaced with Latin clerics. Up until that point the official Christian presence in the region was Greek Orthodox. On Christmas Day 1100, Baldwin I, first king of the Frankish Kingdom of Jerusalem, was crowned in Bethlehem, and that year a Latin episcopate was also established in the town.
In 1187, Saladin, the Sultan of Egypt and Syria who led the Muslim Ayyubids, captured Bethlehem from the Crusaders. The Latin clerics were forced to leave, allowing the Greek Orthodox clergy to return. Saladin agreed to the return of two Latin priests and two deacons in 1192. However, Bethlehem suffered from the loss of the pilgrim trade, as there was a sharp decrease of European pilgrims. William IV, Count of Nevers had promised the Christian bishops of Bethlehem that if Bethlehem should fall under Muslim control, he would welcome them in the small town of Clamecy in present-day Burgundy, France. As a result, the Bishop of Bethlehem duly took up residence in the hospital of Panthenor, Clamecy, in 1223. Clamecy remained the continuous 'in partibus infidelium' seat of the Bishopric of Bethlehem for almost 600 years, until the French Revolution in 1789.
Bethlehem, along with Jerusalem, Nazareth, and Sidon, was briefly ceded to the Crusader Kingdom of Jerusalem by a treaty between Holy Roman Emperor Frederick II and Ayyubid Sultan al-Kamil in 1229, in return for a ten-year truce between the Ayyubids and the Crusaders. The treaty expired in 1239, and Bethlehem was recaptured by the Muslims in 1244. In 1250, with the coming to power of the Mamluks under Rukn al-Din Baibars, tolerance of Christianity declined. Members of the clergy left the city, and in 1263 the town walls were demolished. The Latin clergy returned to Bethlehem the following century, establishing themselves in the monastery adjoining the Basilica of the Nativity. The Greek Orthodox were given control of the basilica and shared control of the Milk Grotto with the Latins and the Armenians.
Bethlehem