The first representative and legislative bodies in Catalonia were the assemblies de pau i treva (peace and truce), whose earliest mention dates back to 1027. These were originally ad hoc meetings at the local level, convened by the clergy (Oliba, Bishop of Vic, who died in 1046, was a notable instigator, but was gradually incorporated into the court of the Counts of Barcelona). The first Catalan legal text, the Usatges de Barcelona, was promulgated by Count Ramon Berenguer I based on the decisions of these assemblies.
Catalonia has had the status of an autonomous community within the Spanish state since 1978. As part of the democratic reforms in Spain, the first legislative elections in Catalonia took place on 20 March 1980 under the Statute of Autonomy of 1979. This first Statute of Autonomy was replaced in 2006 by a new version with extended powers. Furthermore, a majority of Catalan parties are seeking an extension of autonomous powers. On 9 November 2015, parliament passed a resolution on secession from Spain ("Resolution on the start of the political process in Catalonia as a result of the election result of 27 September 2015"). According to this, the Catalans should be independent by 2017. 72 MPs voted in favour of the pro-independence proposal, 63 against. In its ruling of 2 December 2015, the Constitutional Court upheld a complaint and declared the parliamentary resolution of 9 November 2015 unconstitutional and null and void.