The current “Hagia Sophia” is the third structure to stand on this spot. The first church was built by the son of Constantine the Great, Constantius. It was burnt down in 404. The second was built by Theodosius II, and it was burnt down in 532.
The present building was built by the great Byzantine Emperor Justinian and was dedicated on December 26, 537. It took six years to build and over 10,000 men worked on it. Although the dome has been repaired (rebuilt) a number of times, the church built by Justinian served as a Christian place of worship until Constantinople was captured by the Turk, Mehmet II on May 29, 1453.
Mehmet II immediately turned the building into a mosque and it served as one of the major mosques of Istanbul until the reforms of Atatürk. It reopened in 1934 as a museum. In July 2020 it was turned back into a mosque—now, according to the Turkish government, the "Hagia Sophia Holy Grand Mosque.