In those times Kos was an independent unit to which Kalymnos and Leros belonged to. The command of the Knights was carried out by few commanding officers but they offered sufficient protection from the attacks of the pirates and the Muslim empire. According to the Knights records which can be found in Malta today, the commanding officer’s responsibility was to ensure the safety of the residents, the enforcement of justice, secure ownership of land and also protect the residents from arbitrariness of military power. One of the most important tasks of the military was the preservation of the castles and fortresses. Today we can still see eleven different fortresses on the island. The most well-known being the Castle of Old Pyli, and the Castle of Andimahia.