Hagia Sophia had served as a Christian church for hundreds of years before Constantinople fell to the Ottoman Turks in 1453. (In fact nearly a 1000 years).It would not be the last conversion from church to mosque in Turkey in recent times.
In recent weeks it was announced that the Monastery of Stoudios — the largest Byzantine-era monastery in Istanbul — would be converted into a mosque next year.It is indeed a litmus test being played by the Turkish authorities to gauge the reaction internally as well as internationally. It must be remembered that this is just one episode of the "path towards a more Islamification" of the country, specifically a more conservative Sunni trend.
It is certainly a great example of the double standards being applied, mostly on the part of the Turkish authorities, who have a track record in shedding crocodile tears and exclaiming "outrage" at the lack of progress with mosque building, (latest round being directed at Athens), while openly supporting a stronger Islamic ethos throughout the country; to the detriment of other religious minorities.
Religions equality in Turkey is very difficult to define as it is Sunni Islam that dominates and holds sway. Religious minorities including Orthodox, Catholics, Armenians, Protestants, Syriacs Christians, Jews,and Alevi Muslims face restrictions & regular discrimination.