When the Ottoman Turks took control over the former Byzantine Empire, the Hagia Sophia, which had been built as a cathedral by Emperor Justinian in the sixth century, was converted into a mosque. The conversion of the Hagia Sophia was an important symbol of power for the conquering ruler, Sultan Mehmet II. Many of the Byzantine mosaics were covered in plaster and certain elements, such as the altar, were removed. Elements of Islamic architecture were incorporated into the building, such as the mihrab (a niche that indicates the direction of Mecca for prayer), as well as the large minarets outside. In the twentieth century, the Hagia Sophia became a public museum, and many of the Byzantine mosaics were restored.