The present building, now a mosque, was the third church building on the site. The third Hagia Sophia was built between 532 and 537, as the cathedral of Constantinople, the capital city of the Roman Empire in Late Antiquity. The Roman emperor Justinian the Great ordered the construction. The architects were Anthemius of Tralles and Isidore of Miletus. The Greek historian Procopius wrote about Hagia Sophia's construction. The building's roof (a large dome) fell down not long after the church was complete. Justinian again ordered the church's completion. The dome broke apart and has been rebuilt many times, but the walls and floor of the building are the same as those of Justinian's time. The decorations, including mosaics and frescoes, are mostly from the Middle Ages.