The mosque as it is known today was built in 1091 by the Seljuk ruler Malik-Shah. The design influenced by the Umayyad Mosque in Damascus, used the locally found black basalt rock. The mosque suffered extensive damage in a fire in 1155. The Great Mosque of Diyarbakir is the oldest and one of the most significant mosques in Mesopotamia. Following the Muslim capture of Diyarbakir in 639 during the reign of the second Caliph Umar, a mosque was built, but the building fell into disuse and ruin sometime later. Even after the conversion of the church into the mosque, it was used by both Muslims and Christians. In 1091 Sultan Malik Shah directed the local Seljuk governor Maidud Davla to rebuild a mosque on the site. Completed in 1092, the mosque is similar to and heavily influenced by the Umayyad Great Mosque in Damascus. The influence of the Damascus mosque brought Syrian architecture and decoration to Anatolia. The portal of the mosque is carved with two lions attacking two bulls. The mosque consists of a prayer hall which makes up the entire south wall of the courtyard, three aisles which together are more than twice as wide as they are deep. The high roof of the central hall is made of timber trusses, supported by rows of rectangular stone piers. The mosque is actually a complex of buildings around a courtyard long by wide. The façade of the courtyard is highly decorated two-story colonnade on the east, south, and west sides, with only one story on the north side. The western façade, rebuilt by the AtabekInaloglu Abu Mansur İlaldı between 1117 and 1125 following an earthquake and fire in 1115, reuses columns and sculptural moldings from a Roman theater. The architect Hibat Allah al Gurgani was responsible for both that reconstruction and the square minaret rising above the qibla wall. Also included in the complex are the Mesudiye Medresesi and, not connected to the courtyard, the Zinciriye Medresesi . The center of the courtyard has an Ottoman shadirvan and a platform for praying; both block a clear view through the courtyard. Many Kufic inscriptions record in detail the rebuilding and additions made to the complex throughout its long history. Lavish carving and decoration of the columns of the courtyard are one of the distinguishing features of the Great Mosque. The western arcade of the courtyard includes the first use of the broken arch.