Its present form comprises a total of seven concentric rectangular walled courts , culminating in an inner sanctum , and dates from the 15th and 16th centuries , after it had been liberated from Muslim invaders who had previously used it as a fortress .
The fortress was built in the 15th century .