The Hagia Sophia is located in Istanbul, Turkey, specifically in the Sultanahmet district. This historic site was originally constructed as a cathedral, later became a mosque, then served as a museum, and is now a mosque once more. It is celebrated as a masterpiece of Byzantine architecture.