The Church of the Holy Wisdom of God or Hagia Sophia in English (its full name is ὁ Ναός τῆς Ἁγίας τοῦ Θεοῦ Σοφίας) is the primary cathedral of the Ecumenical Patriarch of Constantinople. Built between 532 and 537 on the order of the Eastern Roman Emperor Justinian, it remained the largest church in the world for nearly a thousand years, only supplanted by El Escorial in 1584.
After the fall of Constantinople to the Turks in 1453, Sultan Mehmed II ordered the church be converted into a mosque. It was known in Turkish as "Ayasofya".
Although Greece won its independence from the Ottoman Empire in 1863, Constantinople and much of Epirus, Macedonia, and Thrace remained under Turkish control. It would not be until 1919 that Constantinople was liberated by an international force of the Federated Kingdoms, France, Italy, Japan, and Greece and it was not 1924 until Greece was awarded the city by the League of Nations. After the war, a concerted effort to restore the church to its Byzantine glory was undertaken. In a special sacrament, the reigning ecumenical patriarch reconsecrated the cathedral on Lazarus Sunday (10th of April) and a great hierarchal-liturgy was celebrated, with Greece's King George, himself a Lutheran, in attendance. The combined international force, Greece, another multinational occupational-force, and Greece again have spent millions of pounds to restore the cathedral to its pre-islamic splendor, although this has been no easy feat and even in the present day, a great sum of money is spent by the Greek state and the Orthodox faithful the world over to keep restoration running smoothly by preserving what's left and fixing what's been broken during 466 of continuous use as a Sunni mosque.