"Hagia Sophia ... is a former Greek Orthodox Christian patriarchal basilica (church), later an Ottoman imperial mosque and now a museum (Ayasofya Müzesi) in Istanbul, Turkey. From the date of its construction in 537 AD until 1453, it served as an Eastern Orthodox cathedral and the seat of the Patriarch of Constantinople, except between 1204 and 1261, when it was converted by the Fourth Crusaders to a Roman Catholic cathedral under the Latin Empire. The building was later converted into an Ottoman mosque from 29 May 1453 until 1931. It was then secularized and opened as a museum on 1 February 1935. Famous in particular for its massive dome, it is considered the epitome of Byzantine architecture and is said to have 'changed the history of architecture'. It remained the world's largest cathedral for nearly a thousand years, until Seville Cathedral was completed in 1520." Source: Wikipedia.
Comment: The transformation of Hagia Sophia over the centuries -- the way it was converted from a basilica to a mosque and finally to a museum -- is a classic example of what used to be called cultural genocide, a phrase now used loosely to refer to the destruction of cultural heritage. Just as the early Christian church frequently built its cathedrals over pagan temples and burial grounds, the Muslims took over Hagia Sofia and turned it into a mosque and now the basilica has been preserved as a purely secular museum where tourists can marvel at this architectural wonder that used to have so much religious significance. It has become a pretty building and little more.
The same process of cultural destruction and Disneyfication is still happening in Europe. For instance, churches are being closed or converted into mosques all over England while hundreds of new mosques are being constructed. In some cases, churches have been converted into homes and bars. Others have simply been demolished. The medieval St. Nicholas' church in Estonia was turned into a museum decades ago. The list goes on and on. The scale and magnificence of Hagia Sofia is the main reason why it has survived when so many other churches haven't. As for the great cathedrals of Europe -- the monumental symbols of western civilization -- some of them are still being used for worship, but they are already becoming museums and tourist attractions, something that would have probably been considered blasphemous back in the Middle Ages.
Hagia Sofia is a symbol of what happens to a civilization when it has been defeated by an alien culture and then overwhelmed by the forces of modern secularism.