 Originally there had been a watchtower where the Castle of Capdepera stands today which was used to guard the coast.In 1300 James II of Aragon ordered the construction of a fortified village which would control the uninhabited land below and the maritime routes with Majorca.For centuries the village survived behind its walls protected from pirate attacks.