The tower at Broto was used as a prison at the decree of Jaime 1st and later confirmed by his grandson Jaime 2nd in relation to the use of pastures. These powers allowed them to meet out justice, as well as deal with political and economic affairs; to the extent where those who committed offences would be judged within the community and locked away to languish within the dark walls of this ancient defence tower turned prison.
Among the prisoners there would have been inhabitants of neighbouring French villages as a result of the continuous quarrels over pastures and livestock on the borders. Other inmates would have been smugglers of which there were many in the area for a long period of history. At times even pilgrims would appear in the prison.
And it was precisely these dark prison stretches that gave rise to the curious ad lib markings and drawings left on the walls of the cells by the prisoners.
source: http://www.pirineosordesa.com/patrimonio/14-la-torre-de-la-carcel-de-broto