It was used as a church for 916 years but, following the conquest of Istanbul by Fatih Sultan Mehmed, the Hagia Sophia was converted into mosque. Afterwards, it was used as a mosque for 482 years. Under the order of Atatürk and the decision of the Council of Ministers, Hagia Sophia was converted into a museum in 1935.