some grammer, spelling corrections
Under the Muslims it remained a Christian church, unlike many other churches, which suffered destruction or conversion into mosques. The early Muslim rulers protected the city's Christian sites, prohibiting their destruction and their use as living quarters, but after a riot in 966, where the doors and roof were burnt, the original building was completely destroyed on [[October 18]], 1009, by the "mad" Fatimid caliph Al-Hakim bi-Amr Allah, who hacked out the church's foundations down to bedrock. The east and west walls and the roof of the Edicule were destroyed or damaged (contemporary accounts vary), but the north and south walls were likely protected by rubble from further damage.
However, after a peace treaty between the Byzantine emperor [[w:Romanos III|Romanos III]] and the caliphate, the church is gradually rebuilt between 1024 and 1048. In 1048, a series of small
chapels was erected on the site by [[Constantine IX Monomachos]] under stringent conditions imposed by the caliphate. The rebuilt sites were taken by the knights of the [[First Crusade]] on [[July 15]], 1099. Crusader chief Godfrey of Bouillon, who became the first "king of Jerusalem," decided not to use the title "king" during his lifetime, and declared himself ''Advocatus Sancti Sepulchri'', "Protector (or Defender) of the Holy Sepulchre." The chronicler William of Tyre reports on the reconstruction. The Crusaders began to renovate the church in a Romanesque style and added a bell tower. These renovations which unified the holy sites were completed during the reign of Queen Melisende 50 years later in 1149. The church was also the site of the kingdom's scriptorium. The church was an inspiration for churches in Europe like Santa Gerusalemme in Bologna and the "Round Church" of Cambridge, England.
After defeating the
crusadors, [[w:Saladin|Saladin]] brings down the Cross and turns the church into a mosque (1187-1190). After an agreement with the Byzantine emperor [[W:Isaac II Angelos|Isaac II Angelos]], Saladin gives the church back to the christians; by 1390 a number of new repairs are made to the church.
Until the [[w:Fall of Constantinople|fall of Constantinople]] in 1453, the orthodox patriarchs kept the keys of the church. This law, by Patriarch Dorotheos, was renewed by Sultan [[w:Suleiman the magnificent|Suleiman]] in 1517. With the new law of Suleiman, they keys were given to a Muslim family in 1545. During this period the canopy of the Holy Sepulchre is also repaired.
In 1545 Patriarch Germanos adds a small dome to the church and the Franciscan monks renovated it further in 1555, as it had been neglected despite increased numbers of pilgrims. During 1719-1720 the church is
reparied further by the orthodox and also the Catholics.
In 1808, the Armenians set the church on fire, which severely damaged the structure, causing the dome of the Rotunda to collapse and smashing the Edicule's exterior decoration. The Rotunda and the Edicule's exterior were rebuilt in 1809 and 1810 by collections of the
orthodox people world wide and especially from the Greek architect [[W:Komnenos|Komnenos]] Mitilineos.
In 1834 and 1836, two earthquakes damage the church. The repairs from this damage
begin in 1867-1869 after a great delay but the temple dome is finally renovated through the assistance of the Russians, the French and the Turkish. The 1808 fire did not reach the interior of the Edicule, and the marble decoration of the Tomb dates mainly to the 1555 restoration. The current dome dates from 1870.
In more recent times, the small dome was destroyed in 1927 by an earthquake. In 1931-33 the church was rebuilt through the financial assistance of the Greek State. In 1948 the big dome of the Church
is hit and is repaired within the same year. By 1958, after an agreement between the three churches of Jerusalem (the Greeks, the Armenians and the Catholics), extensive modern renovations began, including a rebuilding of the large dome (1978-1985) and a redecoration of it (1994-1997). In 1995 the exterior of the dome of the Katholikon was repaired with copper, and restoration works continue until this present time.
Several Christian communions cooperate (sometimes acrimoniously) in the administration and maintenance of the church and its grounds, under a fiat of ''status quo'' that was issued by the Sublime Porte in 1852, to end the violent local bickering. The three, first appointed when Crusaders held Jerusalem, are the [[Orthodox Church|Orthodox]], the [[Church of Armenia|Armenian Apostolic]] and [[Roman Catholic Church|Roman Catholic]] churches. These remain the primary custodians of the church. In the 19th century, the [[Church of Alexandria (Coptic)|Coptic Orthodox]], the [[Church of Ethiopia|Ethiopian Orthodox]] and the [[Church of Antioch (Jacobite)|Syrian Orthodox]] acquired lesser responsibilities, which include shrines and other structures within and around the building. An agreement regulates times and places of worship for each communion. For centuries, two neutral neighbour Muslim families appointed by Saladin, the Nuseibeh and Joudeh families, were the custodians of the key to the single door.
When a fire broke out in 1840, dozens of pilgrims were trampled to death. On June 20, 1999, all the Christian communions who share control agreed in a decision to install a new exit door in the church.
==The Brotherhood of the Holy Sepulchre==