It appears regularly in movies, usually east-meets-west spy thrillers or Dan Brown-esque conspiracies where a certain Christian-Muslim-secular mystery and intrigue is required. The Hagia Sophia is Istanbul's tourist zone bookend to counter the Blue Mosque. As such, it's as equally thronged as the Blue Mosque and the nearby Topkapi Palace. It owes its frequent cinematic backdrop to its intriguing history, which also makes it worth braving the crowds to visit.
Hagia Sophia, sometimes also written Sofia and meaning "Church of Holy Wisdom", was built by the Emperor Justinian in the mid 500's. It was intended to be a grand cathedral for the home of the Orthodox Patriarch of Constantinople. It replaced two earlier structures which dated back to the time of Constantine, the first of which was burned down by rioters as a result of a conflict between the Patriarch of the time and the emperor's wife, the second of which was also burned down during a political uprising. Wisely, the third structure was built of stone so still stands today.
Hagia Sophia was a Christian church until 1453. It was the cathedral of the Eastern Orthodox Patriarch of Constantinople for all of that time except 50 years or so during the early 1200's when it was used as a Roman Catholic cathedral. When the Ottoman empire conquered Constantinople in 1453, they converted the Hagia Sophia to a mosque and renamed the city Istanbul. It operated as a mosque until 1931 when it was closed; it was opened four years later as a museum, which it remains to this day.
That history--as church, mosque, and museum--makes for a fascinating blend. Restorations have uncovered some of the first, earliest Christian motifs: frescoes and mosaics of New Testament figures that were covered for centuries while the structure was used as a mosque. In what is one of the most interesting architectural views in the world, the image of Jesus sitting in Mary's lap is flanked by large Arabic Islamic medallions, the one to the left bearing the name "Mohammed", the one to the right "Allah".
If, like we blogged about a few days ago, Turkey is the east-west crossroads of Christian-Muslim culture, captured in a successful, modern, secular society (that is, by the way, a politically and economically stable democracy), then Hagia Sophia is its epicenter.