Bottom line: the supposed third holiest site in Islam went without even rudimentary maintenance for hundreds of years until it fell under a British mandate after World War I. It then went without essential repairs under Muslim control from the time of a 1927 earthquake until Israel captured all of Jerusalem in the six day war 40 years later and Moshe Dayan turned the day to day management over to a Muslim religious trust to whom the Israelis lent their expertise and money in making a full restoration.