User: When was the Hagia Sophia (znik) built?
Assistant: The Hagia Sophia was built in the 6th century. It was originally a Christian church, but it was converted to a mosque during the Ottoman Empire in the 16th century.