The historical capital was first La Seu d'Urgell and later Balaguer. Andorra was ceded to the bishop of La Seu d'Urgell by the count Ermengol IV of Urgell in the 12th century. The county of Urgell was extinguished after the revolt of the count James II of Urgell against the king Ferdinand II of Aragon in 1413.
There is still a bishop of Urgell, who since 2003 has been Joan Enric Vives Sicília. This role carries with it the position of joint head of state of Andorra.