The town was known as Arsinoe (after Arsinoe of Egypt) in antiquity, then Ammochostos (meaning "hidden in sand") which is how it is today referred to in Greek. The same name developed into Famagusta,used in Western European languages and the Turkish name of Mağusa (Gazi is a Turkish prefix meaning veteran). It seems to have had its heyday in the 13th century when Christians fleeing from Syria and Palestine settled there thriving under the Lusignan dynasty, which ruled from 1192. It declined after a riot in the 14th century and by 1489, when the Venetians took over, it had seen better times. They redeveloped it, building a massive wall round the old town, still mostly remaining. The Martinengo bastion is an excellent example of expert fortification, as it provides protection for the walls on either side of it. The Ottoman forces took over in 1571, converting churches into mosques or using them for secular purposes. The Cathedral of St Nicholas became the Lala Mustapha Pasa Mosque.
After the British acquired Cyprus in 1878, they demolished many buildings to provide material for Port Said and the Suez Canal. Famagusta was occupied by the Turkish military during the invasion of the island by Turkey in 1974. The Greek Cypriot inhabitants fled, never to return again. Consequently, most of the then-modern part of the city, known as Varosha, was deserted, becoming a closed-off military zone, something which persists to this day. Varosha is often described as a "Ghost Town" as it has been frozen in time with department stores still full of clothes, now many years out of fashion and hotels still fully equipped.
Turkish Cypriots continue to live north of Varosha, especially in the walled city.