The second.
Spain is very decentralized.
The government of Catalonia, specifically, is second only to the Basque country in terms of self-rule and the main difference between both is that the Basque country has a tax system independent of the national one, because of some historical privileges retained thanks to a late full integration into Spain that didn't happen until after a nasty series of civil wars in the 19th century.
Spoiled below you can read a list of powers and attributions granted to Catalonia by the first autonomy statute it was granted by the modern spanish democracy, the 1979 Statute of Sau, which I am told is a moderately respectable amount of power for a regional government to wield (I have had someone compare it directly with the powers of a german lander, although I cannot vouch for the accuracy of this comparison).
Article 9
The Government of Catalonia has exclusive powers over the following matters:
Organisation of its self-government institutions, within the framework of this Statute.
The preservation, amendment and development of Catalan civil law.
Procedural and administrative rules deriving from the particular features of the substantive law of Catalonia or the special features of the organisation of the Catalan government.
Culture.
Historical, artistic, monumental, architectural, archaeological and scientific heritage, without prejudice to the provisions of point 28 of part 1 of article 149 of the Constitution.
Archives, libraries, museums, newspaper libraries and other centres for the storage of cultural goods which do not belong to the Spanish state. Musical conservatories and fine arts services of interest to the Autonomous Community.
Research, without prejudice to the provisions of point 15 of part 1 of article 149 of the Constitution. Academies whose headquarters are in Catalonia.
The local government system, without prejudice to the provisions of point 1 of part 1 of article 149 of the Constitution. Alterations of municipal boundaries, the official names of municipalities and place names.
Town and country planning, coastal planning, urban development and housing.
Mountains, forestry and forest services, livestock tracks and pastures, protected natural areas and special treatment for mountain areas, in accordance with the provisions of point 23 of part 1 of article 149 of the Constitution.
Health, taking into account the provisions of article 17 of this Statute.
Tourism.
Public works not legally classified as of general interest to the Spanish State and which do not affect another autonomous community.
Highways and paths whose route runs entirely through the territory of Catalonia.
Railways and transport by land, sea, river and cable; ports, heliports, airports and the Meteorological Service of Catalonia, without prejudice to the provisions of points 20 and 21 of part 1 of article 149 of the Constitution. Transport booking centres and loading terminals.
Use of water, canals and irrigation channels when the water runs entirely within Catalonia; Facilities for producing, distributing and transporting energy when such transport does not leave the territory of Catalonia and its use does not affect another province or autonomous community; mineral, spa and underground water. All this without prejudice to the provisions of point 25 of part 1 of article 149 of the Constitution.
Fishing in inland waters, the breeding and collection of shellfish, fish farming, hunting and river and lake fishing.
Crafts.
Organisation of pharmaceuticals, without prejudice to the provisions of point 16 of part 1 of article 149 of the Constitution.
Establishment and organisation of centres for buying and selling goods and securities, in accordance with commercial legislation.
Co-operatives, maritime corporations and mutuals not integrated into the Social Security system, respecting commercial legislation.
Chambers of Property, Chambers of Commerce, Industry and Shipping, without prejudice to the provisions of point 10 of part 1 of article 149 of the Constitution.
Professional organisations and the exercise of qualified professions, without prejudice to the provisions of articles 36 and 139 of the Constitution.
Foundations and associations involved with teaching, culture, art, benefits and care, and others that principally exercise their functions in Catalonia.
Social care.
Young people.
Promotion of women.
Public institutions for protecting and supervising children, respecting, in all cases, civil, criminal and penitentiary legislation..
Sport and leisure.
Advertising, without prejudice to the regulations established by the Spanish government for specific sectors and media.
Shows.
Casinos, gaming and betting, except for mutual gambling for sports benefit purposes.
Statistics of interest to the Catalan government.
Other matters expressly attributed in this Statute as being exclusive powers and those which, with this nature and by means of Act of Parliament, are transferred by the Spanish government in future.
Article 10
Within the framework of basic Spanish legislation and as appropriate, under the terms established by the relevant legislation, it will be the duty of the Catalan government to develop and enforce legislation on the following matters:
The legal system and system of responsibility of the administration of the Catalan government and the public bodies for which it is responsible, as well as the statutory system governing their civil servants.
Compulsory expropriation, contracts and administrative concessions within the powers of the Government of Catalonia.
The public sector reserve of essential resources and services, especially in the case of monopoly, and action to intervene in companies when this is in the public interest.
The organisation of credit, banking and insurance.
The system covering mining and energy.
Environmental protection, without prejudice to the powers of the Government of Catalonia to establish additional protection regulations.
Organisation of the fishing sector.
It is the task of the Government of Catalonia to provide legislative development of the system of Public Municipal Queries in Catalonia in accordance with the provisions of the laws referred to in part 3 of article 92 and point 18 of part 1 of article 149 of the Constitution. Authorisation of their establishment corresponds to the Spanish government.
Article 11
It is the task of the Government of Catalonia to enforce Spanish legislation on the following matters:
Penitentiary institutions.
Employment, taking on the powers, competences and services currently corresponding to the Spanish government in this area in terms of enforcement with respect to labour relations, without prejudice to inspection at a higher level. All powers concerning internal migration and immigration and national and employment records are reserved to the Spanish government, without prejudice to the provisions of Spanish government regulations on these matters.
Intellectual and industrial property.
The appointment of exchange agents, stock exchange agents and brokers. Intervention, as appropriate, in establishing the corresponding demarcations. Intervenció, si s'escau, en la delimitació de les demarcacions corresponents. Pesos i mesures.
Weights and measures.
Assay of metals.
International trade fairs held in Catalonia.
Ports and airports classified as of public interest whose operation is not reserved to the Spanish government.
Organisation of the transport of goods and passengers whose origin and destination is within the Autonomous Community's territory even though they may run on State-owned structures referred to in point 21 of part 1 of article 149 of the Constitution, without prejudice to direct operation reserved to the Spanish government.
Maritime salvage and industrial and pollution spills in Spanish territorial waters corresponding to the Catalan coast.
Other matters expressly attributed in this Statute as involving enforcement powers and those of this kind transferred by the Spanish government by Act of Parliament.
Article 12
In accordance with the rules for organising general economic activity and Spanish government monetary policy, the Government of Catalonia, within the terms of the provisions of articles 38, 131 and points 11 and 13 of part 1 of article 149 of the Constitution, has exclusive powers over the following matters:
Planning economic activity in Catalonia.
Industry, without prejudice to the provisions of Spanish regulations covering health, safety or military interest, and regulations related to industries subject to legislation covering mining, hydrocarbons and nuclear energy. Exclusive powers concerning technology transfer abroad are reserved to the Spanish Government.
The development and enforcement in Catalonia of plans established by the Spanish government for restructuring industrial sectors.
Agriculture and livestock.
Internal trade, consumer and user protection, without prejudice to the general prices policy and legislation protecting competition. Denominations of origin, in co-operation with the Spanish government.
Corporate, public and territorial credit institutions and savings banks.
The public economic sector belonging to the Government of Catalonia concerning everything not dealt with in other regulations in this Statute.
The Government of Catalonia will also take part in the management of the Spanish economic public sector in the appropriate cases and activities.
Article 13
The Government of Catalonia may create an Autonomous Police Force within the framework of this Statute and, concerning matters not specifically regulated here, within the Act of Parliament provided for in article 149, 1, 29 of the Constitution.
The Autonomous Police Force of the Government of Catalonia will carry out the following functions:
The protection of people and property and the maintenance of public order.
Surveillance and protection of the buildings and facilities of the Government of Catalonia.
The other functions provided for in the Act of Parliament referred to in part 1 of this article.
The supreme command of the Autonomous Police Force and the co-ordination of the actions of local police forces correspond to the Government of Catalonia.
In all cases, police services outside the Community and involving more than one Community are reserved to the State Security Forces under the control of the Spanish Government, including surveillance at ports, airports and on coasts and borders, customs, control of entry and exit from national territory of Spanish and foreign citizens, the general system governing foreigners, extradition and expulsion, emigration and immigration, passports, national identity documents, traffic of arms and explosives, the fiscal protection of the State, contraband and fiscal fraud and the other functions they are directly charged with in article 104 of the Constitution and those attributed to them by the Act of Parliament developing this article.
The Criminal Investigation Department and the bodies who act with this function will be under the control of the judges, the courts and the Public Prosecution Service for the functions specified in article 126 of the Constitution and under the terms of the law covering legal proceedings.
The Security Committee is established, made up of an equal number of representatives of the Spanish and Catalan governments, with the mission of co-ordinating the action of the police force of the Government of Catalonia and the State security forces.
The Security Committee will determine the Statute, regulations, powers, numerical composition, structure and recruitment of the police force of the Government of Catalonia, its commanders being appointed from the chiefs and officers of the armed forces and the State security forces who, while they are serving in the police force of the Government of Catalonia, will be in the administrative position provided for in the Act of Parliament referred to in part 1 of this article or determined by the Spanish government. In this situation, they will be outside military jurisdiction. Firearms licences will always correspond to the Spanish government.
Article 14
In using the powers and exercising the competences attributed to it by the Constitution, the Spanish Government will assume the running of all services included in the foregoing article and the State security forces may intervene in functions attributed to the police force of the Government of Catalonia in the following cases:
When so required by the Government of Catalonia. Such intervention will cease when it so requests.
On their own initiative, when they consider the interests of the State to be seriously compromised, and with the approval of the Security Committee. In particular emergency circumstances, State security forces may intervene under the sole responsibility of the Spanish Government, which will be accountable for this to the Spanish Parliament. The Spanish Parliament, through constitutional procedures, may exercise the powers that correspond to it.
In the case of declaration of a state of alarm, emergency or siege, all police forces and bodies will remain under the direct orders of the corresponding civil or military authority, as appropriate, in accordance with the legislation governing these matters.
Article 15
The Government of Catalonia has full powers to regulate and administer education throughout its territory, at all levels and degrees and in all forms and specialities, within its powers, without prejudice to the provisions of article 27 of the Constitution and the Acts of Parliament developed in accordance with part 1 of article 81 of this document, with the powers attributed to the Spanish government in point 30 of part 1 of article 149 of the Constitution and with the higher level inspection needed to ensure compliance with these.
Article 16
Within the framework of basic Spanish regulations, it is the task of the Government of Catalonia to develop and enforce laws covering the radio and television broadcasting system under the terms and cases established in the law governed by the Legal Statute of Radio and Television.
It is also its task, within the framework of basic Spanish regulations, to develop and enforce legislation regulating the Press and, in general, all social communications media.
Under the terms laid down in the foregoing items of this article, the Government of Catalonia may regulate, create and maintain its own television and radio stations and Press organs and, in general, all social means of communication for achieving its purposes.
Article 17
It is the task of the Government of Catalonia to develop legislation and to enforce basic Spanish legislation concerning health within its territory.
Concerning social security, it is the task of the Government of Catalonia:
To develop legislation and to enforce basic Spanish legislation, except for the regulations making up the financial system.
To manage the Social Security financial system.
It is also the task of the Government of Catalonia to enforce Spanish legislation concerning pharmaceutical products.
For these purposes, the Government of Catalonia may organise and administer within its territory all services concerning these subsidiary matters and supervise the institutions, bodies and foundations involved with health and social security, while the Spanish government reserves the right to higher level inspection to ensure compliance with the functions and competences contained in this article.
The Government of Catalonia will adapt the exercise of the powers it assumes concerning health and social security to the criteria of democratic participation by all those involved, and by trade unions and employers' associations under the terms established by law.
Article 18
Concerning the administration of justice, aside from military justice, it is the task of the Government of Catalonia:
To exercise all the powers recognised or attributed to the Spanish government by the Judiciary Acts and the General Judiciary Council.
To fix the boundaries of the territorial demarcations of jurisdictional bodies in Catalonia and the locations of their headquarters.
To assist in organising customary and traditional courts and in establishing courthouses, always subject to the provisions of the Judiciary Act.
Article 19
The High Court of Justice of Catalonia, into which the current Barcelona District Court will be incorporated, is the jurisdictional body at the head of the judicial organisation in its territorial area and before which the successive rights of appeal will be exhausted, under the terms of article 152 of the Constitution and in accordance with this Statute.
Article 20
The powers of the jurisdictional bodies of Catalonia extend:
To civil cases, at all instances and levels, including appeals on points of law or for review on matters of Catalan Civil Law.
To criminal and social cases, at all instances and levels, except appeals on points of law or for review.
To cases of administrative disputes at all instances and levels, concerning acts passed by the Executive council or Government and by the Administration of the Government of Catalonia concerning legislation corresponding exclusively to the Autonomous Community and, in the first instance, concerning acts passed by the Spanish Government Administration in Catalonia.
To matters of competence between judicial bodies in Catalonia.
To appeals concerning the classification of documents referring to Catalan property law requiring access to the Property Registries.
In other matters, appeals on points of law or corresponding ones under Spanish law, or, as appropriate, those for review, may be lodged if necessary. The Supreme Court will also resolve conflicts of competence and jurisdiction between the Catalan Courts and those in the rest of Spain.
Article 21
The President of the High Court of Justice of Catalonia will be appointed by the King following a proposal by the General Judiciary Council. The President of the Government of Catalonia will order the publication of this appointment in the official gazette of the Government of Catalonia.
The appointment of the Magistrates, Judges and Clerks of the High Court of Justice of Catalonia will be made in the manner established in the Judiciary and General Judiciary Council Acts.
Article 22
At the request of the Government of Catalonia, the competent body will hold selection processes and competitive examinations to cover vacancies in Catalonia for Magistrates, Judges, Court Clerks and all other staff of the Justice Administration Service in accordance with the provisions of the Judiciary Act.
Article 23
The selection processes, competitive examinations and appointments to fill vacancies in Catalonia for Magistrates, Judges, Court Clerks and other staff of the Justice Administration Service will be made in the manner established in the Judiciary and General Judiciary Council Acts, and credit will be given for specialisation in Catalan law. In no case may anyone be excluded because of their background or place of residence.
The organisation and operation of the Public Prosecutor's Office corresponds entirely to the Spanish government, in accordance with general law.
Article 24
Notaries Public and Property and Companies Registrars will be appointed by the Government of Catalonia, in accordance with Spanish law. Candidates to be notaries public will be admitted with equal rights, whether they practise in Catalan territory or in the rest of Spain. In these selection procedures and competitive examinations, credit will be given for specialisation in Catalan law. In no case may anyone be excluded because of their background or place of residence.
The Catalan government will take part in fixing the demarcations corresponding to the Property and Companies registries to accommodate them to the applicable provisions of article 18, paragraph 2 of this Statute. It will also take part in fixing notarial demarcations and the number of notaries public, in accordance with the provisions of Spanish law.
Article 25
All the powers mentioned in the foregoing articles and others in this Statute will be understood to refer to the territory of Catalonia.
In the exercise of its exclusive competences, the Government of Catalonia has, as necessary, power to legislate, power to regulate and the task of enforcement, including inspection. In the case of the matters indicated in article 11 of this Statute or of similar ones in other precepts contained in it, their exercise must be subject to the regulations passed by the Spanish Government in developing its legislation.
The Government of Catalonia will include in its organisation the corresponding services in order to exercise the powers attributed to it by this Statute.
Article 26
In matters that are the exclusive competence of the Government of Catalonia, Catalan law applies in its territory in preference to any other.
Where its own law does not exist, it will be complemented by Spanish law.
In determining the sources of civil law, the Spanish Government will respect the rules of Catalan civil law.
Article 27
To manage and provide its own services corresponding to matters over which it has exclusive powers, the Government of Catalonia may make agreements with other autonomous communities. These agreements must be approved by the Parliament of Catalonia and notified to the Spanish Parliament. They will come into force thirty days after such notification unless the Spanish Parliament resolves, within the aforementioned period that, because of its content, the agreement must undergo the procedure provided for in the second paragraph of this article, as a co-operation agreement.
The Government of Catalonia may also establish co-operation agreements with other autonomous communities with the prior authorisation of the Spanish Parliament.
The Government of Catalonia will adopt the measures necessary to enforce international treaties and conventions affecting the matters attributed to it according to this Statute.
Considering that Catalan is part of the heritage of other territories and communities, beyond the links and correspondence maintained by academic and cultural institutions, the Government of Catalonia may ask the Spanish Government to draw up and present, as appropriate, to the Spanish Parliament for its approval treaties or agreements making it possible to establish cultural relations with states that these territories or communities form part of or live in.
The Government of Catalonia will be kept informed of the drafting of the treaties and agreements and of parliamentary bills concerning customs duties involved in matters of specific interest to it.
Article 28
The Government of Catalonia may request the Spanish Government to transfer or delegate powers it does not assume under this Statute.
The Government of Catalonia may request the Spanish Parliament, in the framework acts it approves concerning matters that are the exclusive competence of the Spanish Government, to expressly attribute to the Government of Catalonia the power to legislate, in order to develop these acts, under the terms of part 1 of article 150 of the Constitution.
Powers to draw up the aforementioned requests correspond to the Government of Catalonia, as do those to determine the body of the Government of Catalonia to which the transferred or delegated competence should be attributed.
At any rate, that was the old list of stuff. Nowadays, Catalonia is ruled by a rather more expansive statute, negotiated in 2006, that even after the Spanish constitutional court deemed certain parts of it unconstitutional in 2010 is rather more expansive than the list above.