The main room in the Hagia Sophia Museum in Istanbul, Turkey. The original Hagia Sophia building, which was a church, was built by Constantine the Great in the fourth century. The current building, which is the third, was built between 532 and 537 A.D. and is a classic example of Byzantine architecture. In the mid-15th century, the building was converted into a mosque. In 1934, the Hagia Sophia became a museum, and this is its function today.