Hagia Sophia
The sixth-century Byzantine cathedral in Istanbul that became a mosque, then a museum, then a mosque again, each change announcing who owned the city.

For nearly a thousand years, Hagia Sophia was the largest enclosed space human beings had ever built, and for the fifteen hundred years since it was finished it has functioned as a political scoreboard. Whoever holds Constantinople changes what happens inside it, and does so almost immediately.
The emperor Justinian built it after riots burned down its predecessor, commissioning not architects but two mathematicians, Anthemius of Tralles and Isidore of Miletus. They finished in under six years, an astonishing pace, and dedicated it in 537. The trick they pulled off was setting a dome roughly thirty-one meters across on a square base, using pendentives to transfer its weight to four piers, and ringing its base with windows so that the whole thing appears to float on light rather than rest on stone. Contemporaries could not account for it. The dome was too ambitious for the mortar of the age and partly collapsed after earthquakes in 558; it was rebuilt steeper and has stood since 562, through every earthquake Anatolia has thrown at it.
The church
As the cathedral of the Byzantine Empire it was the ceremonial heart of Orthodox Christianity and of the imperial state, which were not separable. Emperors were crowned there. In 1054 papal legates laid a bull of excommunication on its altar, one of the acts conventionally used to date the schism between the Catholic and Orthodox churches. Byzantine chroniclers record that envoys sent by the ruler of Kievan Rus to survey the world's religions reported from Hagia Sophia that they did not know whether they were in heaven or on earth, and that this settled the choice of Orthodoxy for the Slavic world; the story is a later gloss, but it captures what the building was for.
It was stripped by Western Christians, not Muslims. The Fourth Crusade sacked Constantinople in 1204, looted the church's silver and relics, and installed a Latin patriarch. The city never fully recovered, which is part of why it fell two and a half centuries later.
The mosque
When Mehmed II took Constantinople on May 29, 1453, he rode to Hagia Sophia and converted it to a mosque that same week. This was a deliberate claim of succession, not merely a conversion: the sultan now styled himself heir to Rome, and he had taken Rome's greatest church. Minarets were added over the following century, a mihrab was angled toward Mecca, and the mosaics were gradually plastered over, which as it happens preserved them.
The building then reshaped its conquerors' architecture. Ottoman imperial mosques for the next two hundred years, above all those of the great architect Sinan, are extended arguments with Hagia Sophia's dome, attempts to answer it and then beat it.
The museum, and after
In 1934 the government of Mustafa Kemal Ataturk secularized it, and it opened as a museum the following year. That was a statement of the new republic's identity as much as the 1453 conversion had been: Turkey would present itself as a modern secular state with a shared human heritage, and Byzantine mosaics were uncovered for the first time in centuries.
In July 2020, a Turkish court annulled the 1934 decree and President Recep Tayyip Erdogan reopened the building for Muslim prayer within weeks. The mosaics are curtained during services. Greece, the Orthodox churches, and UNESCO objected; domestically it played well with a religious-conservative base and was widely read abroad as a signal about how Turkey now sees itself and its Ottoman past.
Four changes of use, and not one of them was really about liturgy. Hagia Sophia is where states go to announce a change of management, and the fact that the announcement still works, in a building finished in 537, says something about how long these arguments run.