In 1489, when Cyprus came under the rule of the Republic of Venice, Nicosia became their administrative centre and the seat of the Republic. The Venetian Governors saw it as a necessity for all the cities of Cyprus to be fortified due to the Ottoman threat. In 1567 Venetians built the new fortifications of Nicosia, which are well-preserved until today, demolishing the old walls built by the Franks as well as other important buildings of the Frankish era including the King's Palace, other private palaces and churches and monasteries of both Orthodox and Latin Christians. The new walls took the shape of a star with eleven bastions. The design of the bastion is more suitable for artillery and a better control for the defenders. The walls have three gates, to the North Kyrenia Gate, to the west Paphos Gate and to the east Famagusta Gate. The river Pedieos used to flow through the Venetian walled city. In 1567 it was later diverted outside onto the newly built moat for strategic reasons, due to the expected Ottoman attack.