Hagia Sophia building was completed in 537 AD under Byzantine Emperor Justinian I as a Christian cathedral. After the Ottoman conquest of Constantinople in 1453, it was converted into a mosque and minarets and other Islamic architectural elements were added over time. It became a museum in 1935 and returned to use as an active mosque in 2020.
16 hours ago