the city has a long history. in it, the james i of aragon was trained in its castle by the knights templar, being a strategic spot between segre and cinca valleys. furthermore, the city owned the aragonese corts in many times.