Haghia Sophia served as a mosque until 1935, when Ataturk proclaimed that it should become a museum.
Hagia Sophia was converted from a mosque into a museum on Ataturk's orders in 1935.