Hagia Sophia, now known as the Ayasophya Museum, is a former Greek Orthodox patriarchal basilica (church) and later an imperial mosque in Instanbul, Turkey. It is considered one of the greatest and most beautiful buildings in history.