Steeped in history, Nicosia can be traced back to the Bronze Age. It has been the capital of Cyprus since the 11th century AD when it was a spectacular city with a royal palace and over 50 churches. In the 16th century the city was enclosed by the Venetian wall which was built to ward of an Ottoman attack. This wall, that is still standing in part today, was circular with eleven bastions and three gates. Settlements in Nicosia can be traced back as far as 2500 years BC when the first inhabitants settled in Mesaoria. In this era, the town was known as Ledra and was probable renamed Lefkosia after the son of Ptolemy I of Egypt whose name was Lefkos. Nicosia became the centre of administration of the island in the 9th or 10th century and it was the seat of the Byzantine government during this period.