By the early years of the First Byzantine Period (330-840 AD) Heraklion already had fortifications, which were supplemented by both Arab conquerors (840-961 AD) and the Byzantines (961-1204 AD), and subsequently by the Venetians after 1211 AD. But the looming threat from the Turks forced Venice to fortify the capital city of Regno di Candia with the most modern techniques available at the time. The fortifications in the form we can see today are based on the plans of the chief engineer, Michele Sanmicheli. They were built sometime around the period 1462-1560. The main wall was three kilometers long. It had four gates, and seven bastions surrounded by a wide moat. The outer side had ramparts which no longer exist today. The fortifications of Heraklion were considered not only in terms of size, but also because of their aesthetic and functional perfection, to be the most important of the eastern Mediterranean.